Unified network service that connects multiple disparate private networks and end user client devices operating on separate networks

ABSTRACT

A unified network service that connects multiple disparate private networks and end user client devices operating on separate networks is described. The multiple disparate private networks and end user client devices connect to a distributed cloud computing network that provides routing services, security services, and performance services, and that can be controlled consistently regardless of the connection type. The unified network service provides uniform access control at the L3 layer (e.g., at the IP layer) or at a higher layer using user identity information (e.g., a zero-trust model). The disparate private networks are run on top of the distributed cloud computing network. The virtual routing layer of the distributed cloud computing network allows customers of the service to have private resources visible only to client devices (e.g., user devices of the customer and/or server devices of the customer) of the organization while using address space that potentially overlaps with other customers of the distributed cloud computing network.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application No.63/321,757, filed Mar. 20, 2022, U.S. Provisional Application No.63/286,520, filed Dec. 6, 2021, and U.S. Provisional Application No.63/164,492 filed Mar. 22, 2021, which are hereby incorporated byreference.

FIELD

Embodiments of the invention relate to the field of networking; and morespecifically, to a unified network service that connects multipledisparate private networks and end user client devices operating onseparate networks.

BACKGROUND

Companies have historically purchased dedicated, private connectionsbetween offices and across their data centers. For example,Multiprotocol Label Switching (MPLS) networks can be used to connectprivate office networks across geographies. These types of connectionsrequire complex routing across offices, hardware, and clients. Thesetypes of networks also typically require physical devices such asphysical firewalls, DDoS appliances, etc., to secure the privatenetworks. For employees to access the general internet, gateway boxesare installed that receive all traffic from the office or data center.

Companies sometimes want to connect their different networks to eachother while maintaining control of security, routing, and accesspolicies for what part of their network is accessible to the othernetwork. A conventional way to achieve this includes a physicalcolocation (e.g., the two networks deploy routers in the same buildingthat are connected with a physical cable), leasing dark fiber/using ametro cross-connect (e.g., routers are not physically co-located butconnect over fiber that runs over long distances), or setting up directpoint-to-point tunnels over the internet to carry the privatelyexchanged traffic.

SUMMARY

A unified network service that connects multiple disparate privatenetworks and end user client devices operating on separate networks isdescribed in an embodiment. The multiple disparate private networks andend user client devices connect to a distributed cloud computing networkthat provides routing services, security services, and performanceservices, and that can be controlled consistently regardless of theconnection type. The unified network service provides uniform accesscontrol at the L3 layer (e.g., at the IP layer) or at a higher layerusing user identity information (e.g., a zero-trust model). Thedisparate private networks are run on top of the distributed cloudcomputing network. From the perspective of the customer of the service,the distributed cloud computing network appears to be an independentprivate network with a standard private address space (e.g., as definedby RFC1918 for IPv4 and RFC4193 for IPv6). The virtual routing layer ofthe distributed cloud computing network allows customers of the serviceto have private resources visible only to client devices (e.g., userdevices of the customer and/or server devices of the customer) of theorganization while using address space that potentially overlaps withother customers of the distributed cloud computing network.

In an embodiment, an IPsec tunnel request for establishing an IPsectunnel from a customer router to an anycast IP address of a distributedcloud computing network is received. The same anycast IP address isshared among compute servers of the distributed cloud computing network.A handshake is performed with the customer router from a first computeserver including generating security associations for encrypting anddecrypting IPsec traffic. The security associations are propagated toeach compute server and are used for encrypting and decrypting traffic.

In an embodiment, the distributed cloud computing network handlestraffic between two customers having different network namespaces. Eachcustomer can define policies that define traffic destined for the partsof their network that they wish to expose to the other customer anddefine security and access policies for the traffic. A cross-customertunnel (e.g., a GRE tunnel) is deployed on a compute server where oneend terminates inside a first customer namespace and the other endterminates inside a second customer namespace. The customers canconfigure routing policies to determine what traffic in their ownnamespace gets routed to the other customer's namespace, effectivelyinterconnecting the two networks through a virtual traffic exchange.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention may best be understood by referring to the followingdescription and accompanying drawings that are used to illustrateembodiments of the invention. In the drawings:

FIG. 1 illustrates an exemplary unified network service that connectsmultiple disparate private networks of a customer and individual clientdevices operating on public networks according to an embodiment.

FIG. 2 shows an embodiment where the distributed cloud computing networkincludes the data centers that include one or more compute serversaccording to an embodiment.

FIG. 3 illustrates an example of processing traffic received at a firsttraffic interface that is destined to a network that interfaces with asecond traffic interface according to an embodiment.

FIG. 4 is a flow diagram illustrating exemplary operations forprocessing traffic in a unified network service according to anembodiment.

FIG. 5 is a block diagram that illustrates a connection-terminatingprocess capable of receiving and processing public and private IPtraffic from multiple customer networks while attributing ownership ofeach connection to the specific customer and/or network from which itoriginated, according to an embodiment.

FIG. 6 illustrates an example of processing traffic received from an enduser client device that is not on a customer's private network and thatis destined to a private resource or application of the customeraccording to an embodiment.

FIG. 7 is a flow diagram that illustrates exemplary operations forprocessing traffic received from an end user client device that is noton a private network of a customer that is destined to a privateresource or application of the customer according to an embodiment.

FIG. 8 illustrates an example of packets intelligently routed accordingto an embodiment.

FIG. 9 is a flow diagram illustrating exemplary operations forconfiguring and processing IPsec traffic according to an embodiment.

FIG. 10 is a flow diagram that illustrates exemplary operations forprocessing a packet that is destined for a device connected to thedistributed cloud computing network with an IPsec tunnel, according toan embodiment.

FIG. 11 is a flow diagram that illustrates exemplary operations forprocessing a packet that is received from a device connected to thedistributed cloud computing network with an IPsec tunnel, according toan embodiment.

FIG. 12 illustrates an example of processing traffic received from anend user client device associated with a first customer network and thatis destined to a private resource or application associated with asecond customer network according to an embodiment.

FIG. 13 is a flow diagram that illustrates exemplary operations forprocessing traffic received from an end user client device associatedwith a first customer network and that is destined to a private resourceor application associated with a second customer network according to anembodiment.

FIG. 14 illustrates a block diagram for an exemplary data processingsystem that may be used in some embodiment.

DESCRIPTION OF EMBODIMENTS

A unified network service that connects multiple disparate privatenetworks and end user client devices operating on separate networks isdescribed. The multiple disparate private networks and end user clientdevices connect to a distributed cloud computing network that providesrouting services, security services, and performance services, and thatcan be controlled consistently regardless of the connection type. Theunified network service provides uniform access control at the L3 layer(e.g., at the IP layer) or at a higher layer using user identityinformation (e.g., a zero-trust model). The disparate private networksare run on top of the distributed cloud computing network. From theperspective of the customer of the service, the distributed cloudcomputing network appears to be an independent private network with astandard private address space (e.g., as defined by RFC1918 for IPv4 andRFC4193 for IPv6). The routing layer of the distributed cloud computingnetwork allows customers of the service to have private resourcesvisible only to client devices of the organization (e.g., user devicesof the customer and/or server devices of the customer) while usingaddress space that potentially overlaps with other customers of thedistributed cloud computing network.

Individual client devices of users of the customer of the distributedcloud computing network may connect to the distributed cloud computingnetwork using an agent on their device that securely connects to thedistributed cloud computing network. For instance, the agent mayestablish a tunnel connection (e.g., a VPN connection) with a server ofthe distributed cloud computing network and intercept all outgoinginternet traffic or a defined subset of traffic and transmit the trafficover the tunnel to the server. The tunnel connection may be a WireGuardpoint-to-point tunnel or another secure tunnel such as 14, IPsec, orHTTP/2. The agent may connect with the distributed cloud computingnetwork regardless of the internet connection of the client device. Forinstance, the client device may be on a public Wi-Fi network or othernetwork not owned or controlled by the customer. The agent may beconfigured to transmit identity information of the user of the clientdevice (e.g., an email address, a unique device identifier, a uniqueidentifier tied to the agent, an organization identifier to which theuser belongs, etc.) to the server of the distributed cloud computingnetwork. The distributed cloud computing network maintains user andorganization (customer) association for each tunnel connection. Whenrelaying traffic to downstream services for additional processing (e.g.,routing services, security services, and/or performance services), theidentity information is passed along with the data. The agent on thedevice may allow for the client device to receive traffic from otherdevices within the same organization.

Private networks of the customer (e.g., office networks, data centernetworks, virtual private cloud instances, etc.) may connect to thedistributed cloud computing network using stateful tunnel connections(e.g., IPsec, WireGuard, TLS), stateless tunnels such as GRE tunnels,private network interconnects (PNI), or other forms of peering. Forexample, a piece of network equipment of branch office(s) (e.g., arouter) may be configured with a GRE tunnel to the distributed cloudcomputing network. The single GRE tunnel with the same endpoints may beconfigured between multiple compute servers of the distributed cloudcomputing network and the router of the branch office. As anotherexample, a data center may be connected to the distributed cloudcomputing network with a private network interconnect. The distributedcloud computing network offers full-duplex, bidirectional IPconnectivity to the internet with transit provided by the distributedcloud computing network. These connection mechanisms are associated withidentity of the organization (the customer). When relaying traffic todownstream services for additional processing (e.g., routing services,security services, and/or performance services), the identityinformation is passed along with the data. When proxying traffic, thetraffic must originate from the same organization in an embodiment.

The distributed cloud computing network may provide one or moreadditional services to the private networks of the customer. Forexample, traffic directed to a web property of the customer (e.g., adomain such as www.example.com) may be received at the distributed cloudcomputing network instead of an origin server of the customer. Thetraffic may be sent to the distributed cloud computing network becauseDNS record(s) for the web property resolve to the distributed cloudcomputing network instead of the origin server. Alternatively, thetraffic may be sent to the distributed cloud computing network insteadof the origin network because IP address(es) of the origin network areadvertised (e.g., using Border Gateway Protocol (BGP)) by thedistributed cloud computing network instead of being advertised by theorigin network. This causes IP traffic to be received at the distributedcloud computing network instead of being received at the origin network.In either case, a web property may be served by a server on a privateorigin network and traffic serviced through the distributed cloudcomputing network.

As another example of a service that may be provided to private networksof the customer, serverless scripts can be implemented at thedistributed cloud computing network and can access private services byauthenticating with their own identity to the private network. Thisallows serverless scripts to act as clients to access services on theprivate network such as database servers or other internal services.

In an embodiment, regardless of how the traffic is received into theunified network service of the distributed cloud computing network, thetraffic can be subject to one or more services provided by thedistributed cloud computing network including a routing service, asecurity service, and/or a performance service. The security servicemay, for example, apply policies to the traffic including layer 3, layer4, and/or layer 7 policies that may be defined by the customer, performdenial of service detection and mitigation, perform bot detection andmitigation, perform browser isolation, rate limiting, quality of servicetraffic shaping, intrusion detection and mitigation, data lossprevention, and/or anomaly detection. The performance service may, forexample, provide one or more performance features including acting as acontent delivery network, image resizing, video streaming, TLStermination, serverless web applications, and/or load balancers. Therouting service may include, for example, intelligent routing. Since thetraffic may be tagged with identity information (e.g., identity of theorganization, identity of the client device, and/or identity of theuser), the policies can be enforced based on identity in lieu of or inaddition to other network information such as IP addresses.

The distributed cloud computing network maintains a per-customer routingtable in an embodiment. This routing table includes information aboutwhat service can relay traffic to the private destination address of thecustomer along with service-specific data (e.g., tunnel ID or address).The destination could be a server on a private network of the customeror an end user client device of the customer, for example. If theunified network service determines that traffic is allowed to proceed toits destination, the virtual routing table for the customer is accessedto determine the selected service for delivery to the destination andthe connection or packet is sent to that destination.

In an embodiment, traffic can be sent from any one of the connections ofthe customer to the distributed cloud computing network to another oneof the connections of the customer regardless of the differenttechnologies connecting networks and/or devices of the customer to thedistributed cloud computing network. For instance, a TCP connection thatarrives via an agent on an end user client device, or a TCP connectionthat arrives on a GRE tunnel, can be sent to a layer 7 based tunnel.Vice versa, a TCP connection that arrives on a layer 7 based tunnel maybe sent to a tunnel connecting to an end user client device. In case ofa stateless service, such as a GRE tunnel, the data may be unwrapped anddelivered over the stateless tunnel. In case of a stateful tunnel, theunderlying service may relay the connection or packets to the serverwhere the client or tunnel is connected before delivering the connectionor packets to the device or service.

FIG. 1 illustrates an exemplary unified network service that connectsmultiple disparate private networks of a customer and individual clientdevices operating on public networks according to an embodiment. Theunified network service is provided by the distributed cloud computingnetwork 150. The distributed cloud computing network 150 may includemultiple data centers (not illustrated in FIG. 1 ). For instance, FIG. 2shows an embodiment where the distributed cloud computing network 150includes the data centers 210A-N that include one or more computeservers 215A.1-215A.N-215N.1-215N.N respectively. There may be hundredsto thousands of data centers, for example. The data centers 210A-N aregeographically distributed (e.g., throughout the world). Each datacenter may also include one or more control servers, one or more DNSservers, and/or one or more other pieces of network equipment such asrouter(s), switch(es), and/or hub(s). In an embodiment, each computeserver within a data center may process internet traffic (e.g., TCP,UDP, HTTP/S, SPDY, FTP, TCP, UDP, IPSec, SIP, or other IP protocoltraffic). For example, each compute server 215 can perform the functionsas described with respect to FIG. 1 in an embodiment. The data centers210A-N may be connected across the public internet.

Multiple disparate private networks of multiple customers may connect tothe distributed cloud computing network 150, and multiple end userclient devices of multiple customers may connect to the distributedcloud computing network 150. The distributed cloud computing network 150includes multiple traffic interfaces for different types of trafficand/or connections, including the L2/L3 tunnel service 122, the VPNserver 136, the tunnel service 146, the network interconnect 157, theweb server 162, and the IPSec tunnel service 186. The L2/L3 tunnelservice 122 is a traffic interface that may receive/transmit trafficover a L2/L3 tunnel such as a GRE tunnel. The L2/L3 tunnel service 122may be a stateless traffic interface. The VPN server 136 is a trafficinterface that may receive/transmit traffic over a VPN tunnel. The VPNserver may be a stateful traffic interface. The tunnel service 146 is atraffic interface that may receive/transmit traffic over an encryptedtunnel. The tunnel service 146 may be a stateful traffic interface andoperate at layer 7. The network interconnect 157 is a traffic interfacethat receives/transmits traffic over a network interconnect such as aprivate network interconnect. The web server 162 is a traffic interfacethat receives/transmits web traffic. The web server 162 may be astateless or stateful interface depending on the type of traffic beingreceived/transmitted. The IPSec tunnel service 186 is a trafficinterface that receives/transmits traffic over an IPSec tunnel.

The office network 110 is a private network of a customer that may be ata branch office. The office network 110 includes the devices 114 thatare connected to the router 112 or another piece of network equipment.The devices 114 may include server devices, client devices,workstations, laptops, smartphones, printers, copiers, etc., that areconnected on the private office network 110. These devices 114 have anexternal network connection through the router 112 or another piece ofnetwork equipment. A layer 2 or layer 3 tunnel 116 may connect theoffice network 110 (through the router 112) with a layer 2 or layer 3(L2/L3) tunnel service 122 of the distributed cloud computing network150. For instance, a GRE tunnel may be configured between the router 112and the L2/L3 tunnel service 122. Traffic from/to the office network(e.g., all traffic from the office network) is then transmitted over thetunnel connection with the distributed cloud computing network 150.

In an example, a single GRE tunnel with the same endpoints is configuredbetween each of the compute server(s) 215A-215N of the data centers210A-N (terminating at the L2/L3 tunnel service 122) and the router 112of the office network 110. If the customer has multiple offices, thecustomer may configure a GRE tunnel at each of the multiple officesusing the same endpoint of the distributed cloud computing network 150.The GRE endpoints at the compute server(s) 215A-215N may use the sameanycast IP address to terminate the GRE tunnel. A router in each of thedata centers 210A-N may advertise the same anycast IP address and thecompute server(s) 215A-N are configured to accept traffic directed tothat same anycast IP address and advertise that same anycast IP addressto the router. The GRE endpoint at the router 112 is generally apublicly routable IP address for the office network 110. Since the GREendpoints at the compute server(s) 215A-N of the data centers 210A-N usethe same anycast IP address to terminate the GRE tunnel, each of thecompute server(s) 215A-N of the data centers 210A-N are able to receivetraffic over the GRE tunnel from the office network 110. A single GREtunnel configuration on the side of the office network 110 effectivelyestablishes a GRE tunnel with each of the compute server(s) 215A-N,which eliminates the requirement to configure multiple GRE tunnels withdifferent data centers 210A-N. Thus, a single GRE tunnel is effectivelyshared between each of the compute server(s) 215A-N and the officenetwork 110. Any of the compute server(s) 215A-N can be removed fromproduction or fail, and a different one of the compute server(s) 215A-Nis still able to receive the GRE traffic from the office network 110.Also, any of the data centers 210A-N can be removed from production orfail, and the next closest data center to the office network 110 willstart receiving the GRE traffic from the office network 110. Thus, nosingle compute server or single data center 210A-N is a single point offailure. Although an embodiment has been described where GRE tunnels areconfigured between the compute server(s) 215A-N and the office network110 (e.g., the router 112), in an alternative embodiment, GRE tunnelsare configured between a router of each data center 210A-N and theoffice network 110 (e.g., the router 112). However, performing the GREencapsulation/decapsulation on the compute server(s) 215A-N instead ofrouters of the data centers 210A-N reduces the compute overhead on therouters and may provide better scaling.

As another example with respect to IPSec, the private network 180 of acustomer may be at a branch office and includes the devices 184 that areconnected to the router 182 or another piece of equipment. The devices184 may include server devices, client devices, workstations, laptops,smartphones, printers, copiers, etc., that are connected on the privatenetwork 180. These devices 184 have an external network connectionthrough the router 182 or another piece of network equipment. An IPSectunnel 188 connects the private network 180 (through the router 182)with the IPSec tunnel service 186 of the distributed cloud computingnetwork 150. Traffic from/to the private network 180 (e.g., all trafficfrom the private network network) is then transmitted over the IPSectunnel connection with the distributed cloud computing network 150.

In an embodiment, the IPSec tunnel is configured with an anycast IPaddress of the distributed cloud computing network 150. For instance, arouter in each of the data centers 210A-N may advertise the same anycastIP address and the compute server(s) 215A-N are configured to accepttraffic directed to that same anycast IP address and advertise that sameanycast IP address to the router. Since the IPSec tunnel endpoints atthe compute server(s) 215A-N of the data centers 210A-N use the sameanycast IP address, each of the compute server(s) 215A-N of the datacenters 210A-N are able to receive traffic directed to that IP address.

As an example, the router 182 of the private network 180 opens an IPSectunnel to an anycast IP address of the distributed cloud computingnetwork 150. The router 182 connects to a compute server of the datacenters 210A-N that is closest to the router 182 via an anycast protocolimplementation. In an embodiment, each compute server is able to performa handshake (e.g., a key-agreement protocol such as Internet KeyExchange) with the router 182. For instance, key-agreement protocolconfiguration (e.g., customer identifier, preshared key, etc.) may bepropagated to each compute server. The compute server that receives therequest performs the handshake with the router 182 including generatingsecurity associations for encrypting and decrypting traffic. Thesecurity associations include the security parameters for the IPsectunnel (e.g., parameters for authentication and encryption). Securityassociations are installed to the kernel of the compute server forintercepting packets and encrypting or decrypting as necessary. An IPpacket that is destined for the router 182 (or received from the router182) can be received at any of the compute servers of the data centers210A-N due to the anycast IP address. That IP packet must be encryptedaccording to the generated security association and sent to the customerrouter 182 for decryption and processing. Similarly, an encrypted IPpacket received from the customer router 182 over the IPSec tunnel mustbe decrypted using the generated security association.

In an embodiment, the stateful information that allows encryption anddecryption of the IPsec traffic is propagated to each compute server ofthe data centers 210A-N. For example, data about the IPSec tunnel 188(e.g., the IP address of the IPSec tunnel service 186 that performs thehandshake and the IPSec security associations) are stored in a databasethat is available to each compute server. This data may be pushed toeach of the data centers 210A-N and/or each compute server of each datacenter 210A-N (and installed to the kernels of those compute servers),or the data may be queried by a compute server that receives an IPpacket that needs to be encrypted or decrypted with the securityassociations. For example, the IPSec data may be stored in the unifiednetwork routing store as will be described in greater detail laterherein. This stateful information may be handed to the routing service170 that then causes the data to be stored in the unified networkrouting store.

Thus, a customer can establish a single IPSec tunnel to the distributedcloud computing network 150 (which initially is terminated at a singlecompute server) and any of the compute servers of the data centers210A-N can receive and process the IPsec data (e.g., encrypt/decrypt).Thus, a single IPsec tunnel configuration on the side of the privatenetwork 180, for example, effectively establishes an IPsec tunnel witheach of the compute servers of the distributed cloud computing network150. Each compute server is able to handle these IPsec packetsregardless of any one failure point. Any of the compute server(s) 215A-Ncan be removed from production or fail, and a different one of thecompute server(s) 215A-N is still able to receive and process the IPsectraffic from the private network 180. Also, any of the data centers210A-N can be removed from production or fail, and the next closest datacenter to the private network 180 will start receiving the IPsec trafficfrom the private network 180. Thus, no single compute server or singledata center 210A-N is a single point of failure.

While an embodiment has been described with respect to an IPSec tunnelconnecting a private network 180 to the distributed cloud computingnetwork 150, the encrypted tunnel 144 may be an IPSec tunnel and/or theL2/L3 tunnel 116 may be an IPSec tunnel.

Referring back to FIG. 1 , another private network may include a privateapplication or service running on an origin network of the customer. Forinstance, the origin server 140 may have content (e.g., an application,service, etc.) that the customer wants to secure without the contentbeing exposed to the general internet. The content may be runninglocally on the origin server 140 or behind a firewall/NAT. To connectthis private network to the distributed cloud computing network 150, thetunnel client 142 connects to the tunnel service 146 and requests atunnel be established between the origin server 140 and the distributedcloud computing network 150. In an embodiment, the tunnel client 142connects to a compute server that is closest to the origin server 140via an anycast protocol implementation. In another embodiment, thetunnel client 142 connects to a compute server via a site-local address(a private address that is not globally routable) for the computeserver. The connection to the tunnel service 146 is over an encryptedtunnel 144. The connection may be secured with a pinned certificateembedded in the tunnel client 142. The tunnel client 142 may beconfigured to send configuration information for the tunnel to thetunnel service 146. The configuration information may includeauthentication information (e.g., username/password, an access token(e.g., an API key), cryptographic identity (e.g., a certificate), and/oremail address), TLS configuration information (e.g., type of TLSsupported), port, and/or hostname that traffic should be received on.The tunnel client 142 may collect data during operation and report thecollected data to the tunnel service 146 that can be used as additionalmetrics for load balancing. The encrypted tunnel 144 may be a layer 7based tunnel.

A virtual origin may be created within the distributed cloud computingnetwork 150 when the encrypted tunnel 144 is established. The virtualorigin may have its own configuration, access rules, authenticationpolicies, etc. For instance, the tunneled hostname owner can establishpolicies (e.g., allowing X number of connections per second, specifyingcertain routes, specifying incoming traffic from only certain IPaddresses and/or IP address ranges, etc.) that are enforced at thecompute servers of the distributed cloud computing network 150. Thevirtual origin hides the origin of the IP address of the tunneledhostname. Thus, the tunneled content does not have a public IP addressand thus cannot be directly attacked. To say it another way, attacksdirected to the tunneled hostname will not be received at the originserver 140, and the IP address of the origin server 140 is not otherwiseexposed. After establishing the encrypted tunnel 144, data can betransmitted over that tunnel. For instance, a compute server may receivean HTTP request for the tunneled hostname, identify the intended originserver 140, and transmit the HTTP request towards, or over, theestablished tunnel.

As another example, a data center 155 of the customer may be connectedto the distributed cloud computing network 150 with a private networkinterconnect 157. Traffic is then directly transmitted between thenetwork interconnect 157 and the data center 155. Although a PNI isdescribed, the datacenter could also be connected over an InternetExchange or other peering.

As another example of traffic being received at the distributed cloudcomputing network, the end user client devices 130 may connect to thedistributed cloud computing network using an agent on their device thattransmits the internet traffic to the distributed cloud computingnetwork. For instance, the client devices 130 may include the VPN client132 that may establish a tunnel connection (e.g., a VPN connection) witha VPN server 136 running on a compute server of the distributed cloudcomputing network 150. The VPN client 132 may intercept all outgoinginternet traffic or a defined subset of traffic and transmit the trafficover the VPN tunnel 134 to the server. The tunnel connection may be aWireGuard point-to-point tunnel or another secure tunnel such as TLS,IPsec, or HTTP/2. The agent may connect with the distributed cloudcomputing network regardless of the internet connection of the clientdevice. The end user client devices 130 may belong to the customer(e.g., work devices that remote users are using) and/or devices ofindividuals that are affiliated with the customer. In either case, theagent installed on the end user client devices 130 identifies thetraffic as being attributed to the customer. The destination of thetraffic does not need to be that of the customer. For instance, thedestination of the traffic may be an external internet destination 161,for example. The end user client devices 130 may have an internetconnection through a public Wi-Fi network, a private Wi-Fi network, acellular network (e.g., 4G, 5G, etc.), or another network not owned orcontrolled by the customer. The VPN client 132 is configured to transmitidentity information of the user of the client device (e.g., an emailaddress, a unique device identifier, a unique identifier tied to theagent, and an organization identifier to which the user belongs) to theVPN server 136 executing on a compute server of the distributed cloudcomputing network 150. The VPN client 132 may be assigned a private IPaddress (e.g., an IPv4 and/or IPv6), which may come from a subnet chosenby the customers.

Although FIG. 1 illustrates the client devices 130 that include the VPNclient 132 as being not part of the office network 110, it is possiblethat a client device may include a similar VPN client as part of thedevices 114. For instance, an employee may work part time remotely andhave the VPN client installed on their client device, and that VPNclient may still be installed and configured when the employee goes intothe office and is on the office network 110. In an embodiment, if theVPN client detects that it is on an office network, the VPN client maynot establish a VPN tunnel with the VPN server 136 but instead may usethe office network 110. In such an embodiment, the VPN client may stillassociate the traffic with the client device and/or user.

As another example of traffic being received at the distributed cloudcomputing network 150, traffic directed to a web property of thecustomer (e.g., a domain such as www.example.com) may be received at thedistributed cloud computing network instead of an origin server of thecustomer (e.g., origin server 140). For instance, the client devices160, which do not have an agent that causes web traffic 164 to be sentto the distributed cloud computing network 150, may transmit internettraffic for a resource of the customer where that traffic is received atthe distributed cloud computing network 150 instead of the origin. Acompute server may receive network traffic from the client devices 160requesting network resources. For example, the web server 162 executingon a compute server may receive requests for an action to be performedon an identified resource (e.g., an HTTP GET request, an HTTP POSTrequest, other HTTP request methods, or other requests to be applied toan identified resource on an origin server) from a client device. Therequest received from the client device may be destined for an originserver (e.g., origin server 140 or other origin server of the customer).The web server 162 may receive the requests from client devices 160 inseveral ways. In one embodiment, the request is received at the webserver 162 because the domain of the requested web page resolves to anIP address of the distributed cloud computing network 150 instead of theorigin server. For example, if the customer has the domain example.com,a DNS request for example.com returns an IP address of a compute serverof the distributed cloud computing network 150 instead of an IP addressof the origin server handling that domain. Alternatively, the trafficmay be sent to the distributed cloud computing network 150 instead ofthe origin network because IP address(es) of the origin network areadvertised (e.g., using Border Gateway Protocol (BGP)) by thedistributed cloud computing network 150 instead of being advertised bythe origin network. This causes IP traffic to be received at the webserver 162 instead of being received at the origin network. In eithercase, a web property may be served by a server on a private originnetwork and traffic serviced through the distributed cloud computingnetwork 150.

As another example of a service that may be provided to private networksof the customer, serverless scripts can be implemented at thedistributed cloud computing network 150 and can access private servicesby authenticating with their own identity to the private network. Thisallows serverless scripts to act as clients to access services on theprivate network such as database servers or other internal services.

In an embodiment, regardless of how the traffic is received into theunified network service of the distributed cloud computing network 150,the traffic can be subject to one or more services 168 provided by thedistributed cloud computing network 150 including a routing service 170,a security service 172, and/or a performance service 174. The securityservice 172 may, for example, apply policies to the traffic includinglayer 3, layer 4, and/or layer 7 policies that may be defined by thecustomer, perform denial of service detection and mitigation, performbot detection and mitigation, perform browser isolation, intrusiondetection and mitigation, data loss prevention, and/or anomalydetection. The performance service 174 may, for example, provide one ormore performance features including acting as a content deliverynetwork, image resizing, video streaming, TLS termination, serverlessweb applications, rate limiting, quality of service traffic shaping,and/or load balancers. The routing service 170 may include, for example,intelligent routing, and/or otherwise determine the outgoing trafficinterface for the traffic. Since the traffic may be tagged with identityinformation (e.g., identity of the organization, identity of the clientdevice, and/or identity of the user), the policies can be enforced basedon identity in lieu of or in addition to other network information suchas IP addresses.

In an embodiment, traffic may be received from devices on privatenetworks of the customer and/or individual end user client devices,processed at the distributed cloud computing network 150 using a unifiedpolicy set that based on identity, device posture, and/or risk signals,and transmitted to destinations that may be on different privatenetworks or individual end user client devices. For instance, thepolicies may be created by the customer and apply to layer 3, layer 4,and/or layer 7, and the polices can include identity, device posture,and/or risk signals. Also, the distributed cloud computing network cancontrol routing between the resources of the customer, provide qualityof service configuration, and accelerate transit.

For example, a customer may have a secure resource available in theirprivate network at IP address 10.1.2.3 (e.g., the secure resourceavailable through the origin server 140 and exposed over the encryptedtunnel 144), and may specify that only traffic from devices within thecustomer's private network (e.g., traffic from devices 114 of the officenetwork 110) or from devices attributable to the customer (e.g., trafficfrom client devices 130 that have an agent installed that is associatedwith the customer) may access that secure resource. Traffic received atthe distributed cloud computing network 150 that is addressed to the IPaddress 10.1.2.3 will be subject to the identity policy. If the trafficreceived is not from a device in the customer's private network and/ornot from a client device that has an agent associated with the customer,the traffic will be dropped. As another example, the customer mayspecify particular user(s) and/or group(s) of user(s) that are allowedto access the resource at the IP address 10.1.2.3. In such a case, thesecurity service 172 will only allow traffic to reach the resource atthe IP address 10.1.2.3 if that traffic is received from that particularuser(s) and/or group(s) of user(s).

The distributed cloud computing network 150 can also apply networktraffic monitoring, alerting, and/or analysis features. For instance,the security service 172 may provide for an intrusion detection system(IDS). The IDS can notify a customer when traffic is observed thatmatches predefined criteria, such as IP addresses within known sets ofhigh-risk IP addresses. Such criteria can be specified by the customerand/or be dynamically updated based on historical analysis and/orthird-party threat intelligence feeds. Alternatively, or additionally,the IDS may provide events to policies to block traffic matching the IDScriteria (sometimes known as Intrusion Prevention System). As anotherexample, the security service 172 may provide a data loss prevention(DLP) service. The DLP service may perform deep packet inspection and/orapplication payload inspection for monitoring traffic leaving thecustomer's network, scanning for sensitive information, and/or alertingor blocking on violations of access to such sensitive information. Asanother example, the security service 172 may provide an anomalydetection service. The anomaly detection service may notify a customerwhen traffic patterns deviate from normal traffic patterns, which can belearned by monitoring traffic for a learning period and then determiningtraffic that falls outside of normal bounds learned during the learningperiod.

With reference back to FIG. 2 , in an embodiment, the compute servers215A.1-215A.N of the data centers 210A-N are coupled with one or morecontrol servers 230. The control server(s) 230 may provide configurationand other information to these compute servers. As shown in FIG. 2 , thecontrol server(s) 230 include a unified routing control 240 and aunified network routing store 245. The unified routing control 240tracks and provisions unified routing information for the unifiednetwork that is stored in the unified network routing store 245. Theunified network routing store 245, or at least a portion thereof, may bepropagated to the compute servers 215A.1-215A-N of the data centers210A-N. The unified network routing store 245 is the single source oftruth of routing information for a customer's network, which ensuresthat the private network of the customer is consistent. For example, ifthe customer has an IPSec tunnel, the unified routing control 240 mayensure that the CIDR block(s) for the IPSec tunnel do not overlap withother private parts of the network such as other tunnels.

The unified network routing store 245 may include data regardinginterfaces (e.g., tunnels), routes, and connections. For instance, thestore may map IP addresses (which may be virtual addresses) to tunnelsand map tunnels to physical connections. The tunnel information includesinformation about tunnels configured between private networks and thedistributed cloud computing network. The tunnel information may include,for each tunnel, a unique tunnel identifier, a customer identifier thatidentifies the customer to which that tunnel belongs, a type of tunnel(e.g., IPsec tunnel, GRE tunnel, VPN tunnel, origin tunnel, or othertunnel type), and other metadata specific to that tunnel (e.g., acustomer router IP address for an IPsec tunnel, a device private virtualIP address for a VPN tunnel, a customer router IP address for a GREtunnel). The route information may include, for each route, a customeridentifier, a tunnel identifier, a network CIDR block to which thetunnel can route, and priority information. The connection informationincludes information about the interfaces and may include, for eachinterface, an interface identifier, a customer identifier, a tunnelidentifier, a connection index, a client identifier (e.g., a device orprocess identifier for a VPN tunnel), an origin IP address (e.g., apublic IP address of the origin for an origin tunnel, a customerrouter's network interface public IP address for an IPsec tunnel, acustomer router's network interface public IP address for a GRE tunnel,a public IP address of a device for a VPN tunnel), a compute server IPaddress (e.g., an IP address of the compute server that maintains theorigin tunnel, an IP address of the compute server that exchanged thesecurity associations, an IP address of the compute server maintainingthe VPN tunnel), and other metadata such as the security associationsfor an IPsec tunnel.

In an embodiment, the routing service 170 provides an interface thatallows services of the distributed cloud computing network 150 todetermine where traffic should be routed and how the traffic should berouted. For example, the L2/L3 tunnel service 122, the VPN server 136,the tunnel service 146, the network interconnect 157 the IPSec tunnelservice 186, the security service 172, and/or the performance service174 may use the routing service 170 to determine where incoming trafficshould be routed and how the traffic should be routed. As an example, aningress interface (e.g., L2/L3 tunnel service 122, VPN server 136,tunnel service 146, network interconnect 157, IPSec tunnel service 186)may receive a packet from a private portion of a customer's network witha target destination IP address and query the routing service 170 todetermine if the target destination IP address is in the customer'snetwork and if so how to reach it. The routing service 170 accesses theunified network routing store 245 (or a version of the unified networkrouting store 245 that is propagated to the compute server that isexecuting the routing service 170) to determine if there is a matchingroute and if so, respond to the ingress interface with the necessarydata to route the packet (e.g., tunnel ID, type of tunnel, IP address ofa compute server that can handle transmitting the packet (which may be“any” compute server or an IP address that is assigned to a specificcompute server), and other metadata specific to the type of the tunnel.The ingress interface may then use that information to transmit thepacket to the egress interface.

In another embodiment, the ingress interface of the distributed cloudcomputing network 150 transmit the traffic to the services 168 fordetermining the egress interface, whether the packet is permitted to beforwarded to the egress interface and/or target destination, and how thetraffic should be routed to get to the egress interface. Using a similarexample as above, an ingress interface (e.g., L2/L3 tunnel service 122,VPN server 136, tunnel service 146, network interconnect 157, web server162, IPSec tunnel service 186) receives a packet from a private portionof a customer a customer's network with a target destination IP address.The ingress interface forwards the packet to the services 168 and mayinclude identity information attributable for the packet. The securityservice 172 may, for example, apply policies to the traffic includinglayer 3, layer 4, and/or layer 7 policies that may be defined by thecustomer, perform denial of service detection and mitigation, performbot detection and mitigation, perform browser isolation, intrusiondetection and mitigation, data loss prevention, and/or anomalydetection, potentially with identity information. If the packet ispermitted to be forwarded, the routing service 170 may then determinehow to route the packet to transmit the packet to the targetdestination, and may cause the packet to be transmitted over thategress.

The unified network routing store 312 stores persistent routing data andvolatile routing data. Persistent routing data does not often change;whereas volatile routing data changes more frequently (e.g., minutes,hours). For instance, for tunnels, persistent data includes tunnelinformation and routes to tunnels; and volatile data includes dataregarding a tunnel connection from an origin server to a compute serverof the distributed cloud computing network. For an IPSec trafficinterface, persistent data includes data about an IPSec tunnel (e.g.,customer identifier, IP address of the IPSec interface of thedistributed cloud computing network 150 performing the IKE handshake)and an IPSec route (e.g., customer identifier, IP address of the IPSecinterface on the customer's router, the network/CIDR that the IPSecinterface advertises); and volatile data includes data regarding IPSecsecurity associations (e.g., customer identifier, the IP address of theIPSec interface on the customer's router, the Security Parameter Index(SPI), type, key material for encrypting or decrypting, etc.). For VPNserver interface, persistent data includes data about a tunnel client(e.g., customer identifier, device identifier) and data about the IPaddress(es) assigned to the device (e.g., customer identifier, deviceidentifier, the private IP address assigned to the device), and volatiledata includes data about VPN connections (e.g., customer identifier,device identifier, IP address of the compute server of the distributedcloud computing network 150 that terminates the VPN connection). For aL2/L3 tunnel (e.g., a GRE tunnel), persistent data includes data aboutan L2/L3 tunnel (e.g., customer identifier, tunnel routing address) andan L2/L3 tunnel route (e.g., customer identifier, tunnel routingaddress, and network/CIDR that the router advertises).

FIG. 3 illustrates an example of processing traffic received at a firsttraffic interface that is destined to a network that interfaces with asecond traffic interface. The first traffic interface 310 may be anytype of traffic interface for receiving/transmitting traffic fromprivate and/or public networks, including the L2/L3 tunnel service 122,the VPN server 136, the tunnel service 146, the network interconnect157, the web server 162, and/or the IPSec tunnel service 186. Theingress traffic may be attributable to a customer of the unified networkservice. For example, the source of the ingress traffic may be from acustomer network and/or from a device associated with the customer suchas a VPN client. As another example, the ingress traffic may be destinedfor a resource or web property of the customer. The ingress traffic maybe associated with identity of the organization, identity of the clientdevice that transmitted the traffic, and/or identity of the userresponsible for transmitting the traffic. The identity may be determinedbased on the interface in which the ingress traffic was received. Forinstance, if the ingress traffic is received at a GRE traffic interfacethat is connected with a GRE tunnel to a customer network, the customermay be identified through the association of a customer identifier andthe tunnel identifier. As another example, if the ingress traffic isreceived at a VPN server traffic interface that terminates VPNconnections from client devices with VPN clients, the VPN client maytransmit identity information of the user of the client device (e.g., anemail address, a unique device identifier, a unique identifier tied tothe agent, and an organization identifier to which the user belongs). Asanother example, the customer may configure identity properties totraffic interfaces (e.g., the GRE tunnel with identifier of 1 isconnected to the San Jose office; the GRE tunnel with identifier of 2 isconnected to the New York office). The customer may configureorganizational mappings to users/devices (e.g., user Dave is in themarketing department, etc.).

The traffic interface 310 passes the identity information associatedwith the traffic to the security service 172 and/or the performanceservice 174. In some embodiments, the traffic is tagged with theidentity information. The performance service 174, which is optional insome embodiments, performs one or more performance services on thetraffic as previously described using the identity information. Thesecurity service 172, which is optional in some embodiments, performsone or more security services. For example, the security service 172 canapply one or more policies to the received traffic to determine whetheraccess is allowed to the target destination. The policies may be createdby the customer and apply to layer 3, layer 4, layer 7 (for example) andcan be based on identity, device posture, location, and/or risk signals.

If the security service 172 determines that the traffic is not allowedto the destination, the traffic is typically dropped. If the traffic isallowed to the destination, the security service 172 forwards thetraffic to the routing service 170. The routing service 170 determinesthe outgoing traffic interface for the traffic, which may be on adifferent compute server. The incoming traffic interface and theoutgoing traffic interface may be implementing different technologiesconnecting networks and/or devices. For instance, a TCP connection thatarrives via an agent on an end user device or a TCP connection thatarrives on a GRE tunnel can be sent to a layer 7 based tunnel. Viceversa, a TCP connection that arrives on a layer 7 based tunnel may besent to a tunnel connecting to an end user client device.

As shown in FIG. 3 , the compute server 215A includes the unifiednetwork routing store 312. The unified network routing store 312 may bea local copy of the unified network routing store 245 or may be a propersubset of the unified network routing store 245. Like the unifiednetwork routing store 245, the unified network routing store 312 storespersistent routing data and volatile routing data. The routing service170 accesses the unified network routing store 312. As described above,the routing information includes data about routes. Generally, eachroute includes a customer identifier (used to separate private networksof multiple customers), a set of one or more IP addresses of the serviceor resource (which may be private address(es)), and an identifier of thetraffic interface that can handle outgoing traffic to the targeteddestination (e.g., a tunnel identifier). A single route can provide aroute to many destination IP addresses. The granularity of a route,e.g., the size of its IP range, is based on the topology of the networkof the customer. In some embodiments, a single route cannot spanunconnected parts of the network, such as two separate offices.

It is possible that the compute server that receives the incomingtraffic is not able to forward the outgoing traffic to the destination.For instance, if the identified traffic interface is for a trafficinterface with a stateful connection (e.g., an encrypted tunnel) and thecurrent compute server does not have the requisite state (e.g., theencrypted tunnel is not established between the current compute serverand the target destination), the routing service 170 forwards thetraffic to a compute server that is capable of sending that trafficoutbound over the traffic interface. The route may indicate a set of oneor more compute servers that have the traffic interface that can handleoutgoing traffic to the targeted destination. In the example of FIG. 3 ,the routing service 170 forwards traffic to the traffic interface 320 onthe compute server 215B. The traffic metadata (e.g., the customeridentifier, the traffic interface identifier, the set of one or more IPaddresses, and the source/destination of the origin traffic) is alsoforwarded to the traffic interface 320, which then forwards the trafficto the destination 335.

It is also possible that the compute server that receives the incomingtraffic is capable of forwarding the outgoing traffic to thedestination. For instance, if the outgoing traffic interface is a GREtunnel (which is stateless), the current compute server can forward thetraffic over the GRE interface to the destination. In such a case, therouting service 170 forwards the traffic to the outbound trafficinterface 315 running on the current compute server 215A. The trafficmetadata (e.g., the customer identifier, the traffic interfaceidentifier, the set of one or more IP addresses, and thesource/destination of the origin traffic) is also forwarded to thetraffic interface 315, which then forwards the traffic to thedestination 330.

For example, consider traffic being received from a VPN client 132 atthe VPN server 136 that is destined to an application running behind thetunnel client 142 over the encrypted tunnel 144. If a security serviceand/or a performance service is configured to be performed, the VPNserver 136 may transmit the traffic to the security service 172 and/orperformance service 174. After the traffic is processed by theseservice(s), the traffic is forwarded to the routing service 170 forprocessing. If a security service and/or a performance service is notconfigured to be performed, the VPN server 136 may transmit the trafficto the routing service 170. In either case, the routing service 170receives the traffic and that traffic may be associated with identityinformation provided by the VPN client 132 (e.g., customer identifier,user identifier, and/or device identifier). The routing service 170determines the destination of the traffic. If the destination IP addressis associated with a destination of the unified network, the routingservice 170 transmits the traffic to a traffic interface that can handlethe outgoing traffic. For instance, if the routing service 170determines that the destination is associated with an encrypted tunnel144, the routing service 170 determines an identifier of the tunnel, atype of tunnel, and the compute server to which the tunnel is connected(e.g., an IP address of the compute server that is a tunnel endpoint forthe tunnel), and may transmit the traffic over that tunnel to thedestination.

The routing service 170 may be executed on each compute server of thedistributed cloud computing network 150. Each compute server 215 of adata center 210 may have a local copy of the unified network routingstore 312. Alternatively, the unified network routing store 312 may beshared among compute servers 215 of a single data center 210. In eithercase, the unified network routing store 312 may be centrally managedwith updates (e.g., additions, modifications, deletions) beingtransmitted from the central location such as the unified networkrouting store 245. In an embodiment, the routing service 170 uses thelocal version of the unified network routing store 312 when determiningwhere and how to route traffic. However, if the information is wrong orstale, the routing service 170 may request an update from the centrallocation of the data (e.g., the unified network routing store 245). Forexample, if the routing service 170 on a first compute server determinesthat traffic destined for a VPN connection is terminated at a secondcompute server, it will transmit that traffic to that second computeserver. If the second compute server does not terminate that VPNconnection for that traffic (e.g., the routing information is wrong orstale), the second compute server may respond to the routing service 170and/or the first compute server that indicates the information waswrong. The routing service 170 then requests an update from the centrallocation of the data to determine the correct destination.

FIG. 4 is a flow diagram illustrating exemplary operations forprocessing traffic in a unified network service according to anembodiment. The operations of FIG. 4 are described with respect to theexemplary embodiments of FIG. 3 . However, the operations of FIG. 4 canbe performed by embodiments different from that of FIG. 3 , and theembodiments described in reference to FIG. 3 can perform operationsdifferent from that of FIG. 4 .

At operation 410, a first compute server 215A receives traffic at atraffic interface 310. The traffic interface 310 may be, for example, aL2/L3 tunnel interface, a VPN server interface, an encrypted tunnelinterface, a network interconnect interface, an IPSec tunnel interface,or a web server interface. Depending on the type of interface, thereceived traffic may be encrypted and be required to be decrypted beforefurther processing.

Next, at operation 415, the first compute server 215A determines whetherthe traffic is attributable to a customer of the unified networkservice. For example, the source of the ingress traffic may be from acustomer network and/or from a device associated with the customer suchas a VPN client. As another example, the ingress traffic may be destinedfor a resource or web property of the customer. The ingress traffic maybe associated with identity of the organization, identity of the clientdevice that transmitted the traffic, and/or identity of the userresponsible for transmitting the traffic, as previously described. Ifthe traffic is not attributable to a customer, then operation 450 isperformed where alternative action is performed (e.g., the traffic isdropped). If the traffic is attributable to a customer, operation 420 isperformed.

At operation 420, the first compute server 215A determines whether theidentity attributable to the traffic is allowed to access the targetdestination. For example, the security service 172 determines whetherthe identity associated with the traffic is allowed to access the targetdestination. The applicable policy for the target destination may bedefined by the customer. The granularity of the identity required may beconfigured by the customer. For instance, the policy may be at thecustomer level (e.g., only allow traffic that is attributable from thecustomer). As another example, the policy may be at the end user level.For instance, the customer may specify what user(s) (e.g., identified byemail address, phone number, name, device name, identifier, group,country, etc.) are allowed and/or not allowed to access the target IPaddress. Additionally, or alternatively, the customer may specify deviceposture requirements for access to the target IP address. The deviceposture may be provided from third-party endpoint security providers. Insuch a case, the security service 172 queries such third-party endpointsecurity providers for the device posture of the transmitting clientdevice. If the identity associated with the traffic is allowed to accessthe target IP address, then operation 430 is performed. Otherwise,operation 450 is performed.

At operation 430, the first compute server 215A determines the outgoingtraffic interface for the traffic to reach the target destination, whichcould be on a different compute server. For example, the routing service170 accesses the unified network routing store 312 to determine theoutgoing traffic interface for the traffic as previously described. Theoutgoing traffic interface may be a different kind of traffic interfacecompared to the incoming traffic interface. In an embodiment, trafficmay be received on any of the traffic interfaces (e.g., the L2/L3 tunnelservice 122, the VPN server 136, the tunnel service 146, the networkinterconnect 157, the web server 162, and the IPSec tunnel service 186)and sent out on a different one of the traffic interfaces. For instance,traffic arriving on a GRE tunnel interface may be sent to a layer 7based tunnel interface to connect to the target destination. As anotherexample, traffic arriving via an agent on an end user client device canbe sent to an IPSec tunnel interface. Next, at operation 435, thetraffic is transmitted to the determined traffic interface for egresstraffic to the target destination. Next, at operation 440, the trafficis transmitted from the determined traffic interface for the egresstraffic to the target destination.

In an embodiment, traffic attributed to a customer may be received at acompute server of the distributed cloud computing network in a networknamespace for that customer. The network namespace is an isolatednetwork stack specifically allocated for that customer, such as its owninterfaces (with its own eBFP hooks), routing tables, netfilterconfiguration, etc. When a network namespace is created, a pair ofvirtual interfaces (e.g., virtual ethernet (veth) interfaces) arecreated; one in the default network namespace and one in the customernetwork namespace. The traffic may be received at the distributed cloudcomputing network in multiple ways as previously described. Although anetwork namespace may be used, other network isolation primitives may beused to attribute packets to specific customers.

A process (e.g., in some embodiments a single process) terminates thetraffic interfaces in a way that allows the customer to be identified(e.g., so that customer-specific logic can be applied to the traffic)and that allows traffic to be differentiated among multiple customersthat may be using the same private address space for source/destinationIP addresses. This process is sometimes referred herein as theconnection-terminating service (even if some of the interfaces areconnectionless). Packets that are to be delivered to theconnection-terminating service may be marked and encapsulated in aformat that can carry identity information such as customer identityinformation, identity information of the transmitting client device,and/or identity information of the user attributed to the packet. In anembodiment, firewall rules are used to match packets that are to bedelivered to the connection-terminating service. Determining whichpackets to send to the connection-terminating service may be based on IPaddresses, ports, direction of traffic (inbound or outbound),origination of traffic (e.g., arrived over tunnel X), or any combinationof the same. The encapsulation may be a Foo-Over-UDP (FOU). Theencapsulated packets include the identity information, which can beencoded in the form of a unique source IP address associated with aspecific customer, through use of specific UDP ports used only for aspecific customer, or through adding a header to the payload thatcarries identity information, for example. The marking and encapsulationmay be performed in the customer network namespace.

The marked packets with identifying information may be delivered toanother network namespace, referred herein as a proxy namespace. In anembodiment, there is a single proxy namespace per compute server and alltraffic destined for the connection-terminating service from allcustomers is delivered as encapsulated packets into the single proxynamespace. Once an encapsulated packet arrives in the proxy namespace,it is decapsulated. As part of decapsulation, the packet is NATed withcertain properties. For instance, a single NAT table is maintained forall traffic entering the proxy namespace, which means that all customersshare the same NAT table. NAT entries include the identifier information(e.g., the customer identifier) as part of the key in the NAT table.This allows multiple customers to concurrently send connections with thesame source/destination IP addresses and ports without creatingconnection conflicts in the proxy namespace. The decapsulated, NATedpackets then are received at the connection-terminating process runninginside the proxy namespace with an open listening socket listening fornew connections on all destination IP addresses and ports that the NATfunction uses. When the connection-terminating process receives trafficfor a new connection, this process then looks up the NATed connectioninformation in the NAT table of the proxy namespace. This allows theconnection-terminating process to learn the original IP addresses andports before the traffic was NATed, as well as learn the identity of thecustomer to which the connection belongs. This information is sent withthe packets to a service of the distributed cloud computing network(e.g., the security service 172). For example, this information may besent as a preamble header with an extension to include the identityinformation.

To send traffic back to the customer (e.g., a SYN-ACK or other returntraffic), the NATing process is reversed. The original tuple (source IPaddress, destination IP address, source port, destination port) isdetermined by accessing the single NAT table to retrieve the originalpacket information. Once un-NATed, the packet is encapsulated and sentto the customer namespace for the packet. The single NAT table isaccessed to determine the identity information (e.g., the customeridentification) using the packet header information as the key. Thisaccount identifier is translated to a destination IP address that isassigned to the encapsulation header. The encapsulated packet is sent tothe customer namespace where it is decapsulated and the inner packet isrouted back to the customer.

Thus, a single connection-terminating process can receive and processboth public and private IP traffic from multiple customer networks whileattributing ownership of each connection to the specific customer and/ornetwork from which it originated.

FIG. 5 is a block diagram that illustrates a connection-terminatingprocess capable of receiving and processing public and private IPtraffic from multiple customer networks while attributing ownership ofeach connection to the specific customer and/or network from which itoriginated, according to an embodiment. Traffic is received at the port510. The routing decision 511 routes the traffic to the namespace forthat customer out of the customer namespaces 512 to which that trafficis attributable. For example, the source of the traffic may be from acustomer network (e.g., received on a tunnel mapped to a customernetwork) and/or from a device associated with the customer such as a VPNclient. As another example, the destination of the traffic may be to aresource or web property of the customer (e.g., based on the IP addressof the traffic, hostname, SNI). Each customer namespace 512 is a networknamespace in an isolated network stack specifically allocated for thatcustomer and has its own interfaces, routing tables, netfilterconfiguration, etc. Each customer namespace 512 has a virtual interface515 (e.g., a veth interface) for delivering packets to the customernamespace 512. Inside the customer namespace 512, the traffic interface518 may match packets that are to be delivered to the connectiontermination process 550 and mark them with identity information. Thetraffic interface 519 may encapsulate the packets (e.g., FOU). Theencapsulated packets are then sent to the proxy namespace 540.

The proxy namespace 540 includes a virtual interface 532 (e.g., a vethinterface) and the extended Berkeley Packet Filter (eBPF) program 530that decapsulates the encapsulated packets. The eBPF map/NAT tables 542may include multiple maps including a forward table (e.g., originaltuple to converted tuple), reverse table (e.g., converted tuple tooriginal tuple), and an account table (converted tuple to encapsulatedremote IP address). The eBPF program 530 looks up the tuple of thepacket (source IP address, destination IP address, source port,destination port) in the forward table of the eBPF map/NAT tables 542(source IP address, destination IP address, source port, destinationport). If found, the original tuple is replaced by the converted tuple.The converted tuple is a NATed tuple. If there is not an entry, one iscreated where a converted tuple is created, an entry is created in theforward table, an entry is created in the reverse table, an entry iscreated in the account table, and the original tuple is replaced withthe converted tuple. The NATed packet is then passed to the networkingstack of the connection termination process 550. The connectiontermination process 550 listens for new connections at the TCP socket552 on all destination IP addresses and ports that the NAT functionuses. When it receives traffic for a new connection, the connectiontermination process 550 looks up the NATed connection information in theeBPF map/NAT tables 542 that allows the connection termination process550 to learn the original IP addresses and ports before the traffic wasNATed, as well as the identity information to which the connectionbelongs. For instance, the connection termination process 550 looks upthe client tuple in the account table to get identity information, looksup the client tuple in the reverse table to get the original tuple. Theconnection termination process 550 then establishes a connection withthe service proxy 555 over the unix socket 554. A header may be sentwith the original tuple and the account identification to the serviceproxy 555. After this header is sent, the connection may be proxied bythe proxy 556 by copying bytes between the service proxy 555 and theclient until the connection is closed.

To send traffic back to the customer (e.g., a SYN-ACK or other returntraffic), the NATing process is reversed and is then encapsulated with adestination of a device in the customer's namespace. The original tuple(source IP address, destination IP address, source port, destinationport) is determined by accessing the single NAT table to retrieve theoriginal packet information. For instance, the eBPF program 534 looks upthe tuple of the IP packet in the eBPF map/NAT tables 542 (e.g., thetuple of the IP packet in the reverse table). If found, the convertedtuple is replaced with the original tuple. If not found, then the packetis dropped. Once un-NATed, the packet is encapsulated and sent to thecustomer namespace for the packet. The eBPF map/NAT tables 542 isaccessed to determine the identity information (e.g., the customeridentification) using the packet header information as the key. Thisaccount identifier is translated to a destination IP address that isassigned to the encapsulation header. The encapsulated packet is sent tothe customer namespace 512 where it is decapsulated and the inner packetis routed back to the customer.

As a specific example, consider an end user client device that has anagent that connects to the distributed cloud computing network 150 suchas a client device 130 that includes a VPN client 132 that connects tothe distributed cloud computing network 150 over the VPN tunnel 134. Insome cases, such a client device 130 may transmit traffic that isdestined to an application or service on the origin server 140 that isprotected through the encrypted tunnel 144. After traffic is received atthe VPN server 136 from the client devices, the traffic is processed byone or more services 168 as defined by the customer. For instance, thesecurity service 172 may apply policies to the traffic based on theidentity tagged with the traffic.

Assuming that the traffic is allowed to proceed to the application orservice the route from the compute server that received the traffic tothe application or service on the origin server 140 is determined. Theroute associates a set of one or more private IP addresses with a tunnelthat is capable of forwarding traffic to these private IP address(es). Asingle tunnel can provide a route to many destination IP addresses. Thegranularity of a route, e.g., the size of its IP range, is based on thetopology of the network of the customer. In some embodiments, a singleroute cannot span unconnected parts of the network, such as two separateoffices.

The routes are known to the compute servers. Each route in this caseincludes a customer identifier (used to separate private networks ofmultiple customers), a set of one or more private IP addresses of theprivate resource or service, and a tunnel identifier of the tunnel thatconnects the resource or service with the distributed cloud computingnetwork 150. A single tunnel can be associated with multiple resources.Also, a route could have multiple tunnels in some embodiments. If acompute server receives traffic and policy allows access to the privateresource or service (e.g., the packet meets the policy criteria foraccess to the set of private IP addresses for that customer), the packetis transmitted from the services 168 (e.g., the security service 172) tothe tunnel service 146 that is running locally on that compute server,along with the customer identifier, the tunnel identifier, and theoriginal source and destination IP addresses. It is possible that thetunnel connecting the resource or service with the distributed cloudcomputing network 150 is not connected to the compute server thatreceived the traffic (instead the tunnel may be connected to othercompute server(s) possibly in different datacenters). If the localtunnel service 146 does not have the tunnel connection, the local tunnelservice 146 determines which one or more remote compute server(s) thetunnel identified by the tunnel identifier is connected. The localtunnel service 146 transmits the packet to those one or more computeserver(s) that will be received at the remote tunnel service 146 runningon those compute server(s) (e.g., the connection may be proxied over anHTTP/2 proxy). The remote tunnel service 146 proxies the TCP request tothe tunnel client 142 (e.g., setting the destination IP in a header).

For example, FIG. 6 illustrates an example of processing trafficreceived from an end user client device that is not on a customer'sprivate network and that is destined to a private resource orapplication of the customer. The client device 130 includes the VPNclient 132 that establishes a VPN tunnel with the VPN server 136 aspreviously described. In this example, the VPN tunnel is establishedbetween the VPN client 132 and the compute server 215A. Traffic istransmitted from the client device 130, which is intercepted by the VPNclient 132 and transmitted over the VPN tunnel to the VPN server 136. Inthis example, this traffic is destined for a private resource or service615 that is located at the private IP address 10.1.2.3. This privateresource or service 615 is located at the origin server 140. The VPNserver 136 may transmit the traffic to the security service 172 usingone or more sockets (e.g., a socket for HTTP requests, a socket for TCPtraffic) and/or the performance service 174. The traffic may beassociated with identity information provided by the VPN client 132(e.g., customer identifier, user identifier, and/or device identifier).The performance service 174, which is optional in some embodiments,performs one or more performance services on the traffic as previouslydescribed using the identity information. The security service 172 canapply policies to the received traffic to determine whether access isallowed to the private resource or service 615, which may be based onthe identity information. The policies may be created by the customerand apply to layer 3, layer 4, layer 7 (for example) and can be based onidentity, device posture, location, and/or risk signals. If the securityservice 172 determines that the traffic is not allowed to thedestination, the traffic is typically dropped. If the traffic is allowedto the destination, the security service 172 forwards the traffic to therouting service 170. The identity information is also forwarded to therouting service in an embodiment.

The routing service 170 determines the outgoing traffic interface forthe traffic, which may be on a different compute server. For example, itis possible that the tunnel connecting the resource or service with thedistributed cloud computing network is not connected to the computeserver that received the traffic (instead the tunnel may be connected toother compute server(s) possibly in different datacenters). In theexample of FIG. 6 , the routing service 170 accesses the routes for thecustomer in the unified network routing store 312 and determines thatthe tunnel for the IP address is not at this compute server 215A butrather that the tunnel connecting the private service/resource 615 isterminated on the compute server 215B. The compute servers 215A and 215Bmay be in different datacenters. The routing service 170 transmits thetraffic to the tunnel service 146 running on the compute server 215B.The connection may be proxied over an HTTP/2 proxy. The tunnel service146 of the compute server 215B forwards the traffic to the tunnel client142 for the private service/resource 615.

FIG. 7 is a flow diagram that illustrates exemplary operations forprocessing traffic received from an end user client device that is noton a private network of a customer that is destined to a privateresource or application of the customer. The operations of FIG. 7 aredescribed with respect to the exemplary embodiments of FIG. 6 . However,the operations of FIG. 7 can be performed by embodiments different fromthat of FIG. 6 , and the embodiments described in reference to FIG. 6can perform operations different from that of FIG. 7 .

At operation 710, traffic is received at a first compute server from aclient device that is destined to an IP address of a private network ofa customer. In this example, the traffic has a destination IP address of10.1.2.3. For instance, the traffic may be received from an agentinstalled on the client device (e.g., the VPN client 132) at a VPNserver 136 installed at the compute server 215A. In an embodiment, aninitial tunnel route configuration may be transmitted to the VPN client132 that specifies the compute server 215A as the endpoint of thetunnel. In another embodiment, the initial tunnel route configurationspecifies an anycast IP address shared between the compute servers215A-N. In such an embodiment, the compute server 215A connects to theVPN client 132 because it is the one of the compute servers 215A-N thatis closest to the client device in terms of routing protocolconfiguration (e.g., BGP configuration) according to an anycastimplementation. The traffic may be associated with identity informationprovided by the VPN client 132 (e.g., customer identifier, useridentifier, and/or device identifier). The VPN server 136 may transmitthe traffic to the security service 172 using one or more sockets (e.g.,a socket for HTTP requests, a socket for TCP traffic). The traffic maybe tagged with identity information provided by the VPN client 132(e.g., customer identifier, user identifier, and/or device identifier).

Next, at operation 715, a determination is made whether the receivedtraffic is attributable to an enrolled account for the customer. It ispossible that traffic directed to the private IP address is sent from adevice that is not associated with the customer. In such a case,operation 760 is performed where the traffic is dropped. If the receivedtraffic is attributable to an enrolled account for the customer, thenoperation 720 is performed. At operation 720, the security service 172retrieves route(s) for the customer. In this case, each route includes acustomer identifier (used to separate private networks of multiplecustomers), a set of one or more private IP addresses of the privateresource or service, and a tunnel identifier of the tunnel that connectsthe resource or service with the distributed cloud computing network. Inan embodiment, the security service 172 queries the routing service 170to determine the route(s) for the customer, which in turn accesses theunified network routing store 312 to determine the route(s) and returnsthe route information to the security service 172. Next, at operation725, the security service 172 determines whether the target IP addressmatches any route for the customer. For instance, whether a route existsfor the destination IP address of the traffic for that customer. If nosuch route exists, then operation 760 is performed where the traffic isdropped. If such a route exists, then operation 730 is performed.

At operation 730, the security service 172 determines whether theidentity associated with the traffic is allowed to access the target IPaddress. The applicable policy for the target IP address may be definedby the customer. The granularity of the identity required may beconfigured by the customer. For instance, the policy may be at thecustomer level (e.g., only allow traffic that is attributable from thecustomer). As another example, the policy may be at the end user level.For instance, the customer may specify what user(s) (e.g., identified byemail address, phone number, name, device name, identifier, group,country, etc.) are allowed and/or not allowed to access the target IPaddress. Additionally, or alternatively, the customer may specify deviceposture requirements for access to the target IP address. The deviceposture may be provided from third-party endpoint security providers. Insuch a case, the security service 172 queries such third-party endpointsecurity providers for the device posture of the transmitting clientdevice. If the identity associated with the traffic is allowed to accessthe target IP address, then operation 740 is performed. Otherwise,operation 760 is performed and the traffic is dropped.

At operation 740, the security service 172 transmits the traffic to therouting service 170 which performs a lookup to determine the computeserver(s) that have a tunnel established for the target IP address forthe customer. The routing service 170 may access the routes for thecustomer in the unified network routing store 312 for thisdetermination. Next, at operation 745, the routing service 170determines whether a tunnel for the target IP address for the customeris connected at this compute server. For example, with respect to FIG. 6, an appropriate tunnel is not established between the origin server 140and the compute server 215A. If an appropriate tunnel is not availableto the local compute server, then operation 750 is performed where therouting service 170 transmits the traffic to an instance of the tunnelservice 146 running on a compute server that has a tunnel for the IPaddress for the customer. With respect to FIG. 6 , the routing service170 of the compute server 215A transmits the traffic to the tunnelservice 146 running on the compute server 215B. The connection may beproxied over an HTTP/2 proxy. Also transmitted are the customeridentifier, the tunnel identifier, and the original source anddestination IP addresses. Next, at operation 755, the traffic istransmitted over the tunnel to the IP address. For instance, the tunnelservice 146 of the compute server 215B proxies the traffic to the tunnelclient 142 for the private service/resource 615.

FIG. 7 includes a description of an embodiment where the securityservice 172 determines the customer route(s). Alternatively, thesecurity service 172 passes the traffic to the routing service 170 todetermine the customer route(s). For instance, in another embodiment,after determining that the received traffic is attributable to anenrolled account for the customer at operation 715, operation 730 maythen be performed by the security service 172 instead of the operation720. If the identity associated with the traffic is allowed to accessthe target IP address, then operations 720 and 725 are performed by therouting service 170.

Embodiments have been described where packets are received at a firstcompute server and transmitted to a second compute server for deliveryto a device in the customer network. The specific route in which IPpackets (e.g., from the first compute server to the second computeserver) may be determined by conventional routing protocols such asstandard BGP, or in some embodiments, intelligently routed through oneor more intermediary data centers based on a set of factor(s) such aslatency, speed, reliability, and or cost. For instance, in anembodiment, one of the performance and/or security services that can beperformed is intelligently routing traffic to a customer network and/orintelligently routing traffic from a customer network to a clientdevice.

FIG. 8 illustrates an example of packets intelligently routed accordingto an embodiment. Traffic may traverse the internet between the datacenters 210A-N. There may be multiple network providers that providetransit connections between the data centers 210A-N. The differenttransit connections may have different properties (e.g., differentperformance characteristics such as latency, speed, and/or reliability;and cost). An optimized route between an entry data center and an exitdata center may be determined and used. The entry data center is thedata center that initially receives the traffic, and the exit datacenter is the data center that is connected with the destination (e.g.,a customer network). For instance, with respect to FIG. 8 , the datacenter 210A is the entry data center (it receives the traffic from theclient device 810) and the data center 210N is the exit data center (itis the last data center of the data centers 220A-N to the origin server140) of the optimized route. The optimized route may be based on a setof factors such as latency, speed, reliability, and/or cost, for each ofthe transit connections. The optimized route may not be the same as theroute taken by conventional routing protocols such as standard BGP. Forinstance, FIG. 8 illustrates a nonoptimized route 862 from the datacenter 210A (the entry data center) going through the hops (internetnodes) 814 to 816 of the public network 872 (e.g., the public internet)to the origin server 140. As illustrated in FIG. 8 , the traffic for thenonoptimized route is carried through the GRE tunnel 830 from the datacenter 210A to the origin server 140, traversing the hops 814 and 816.The nonoptimized route 862 may be determined based on conventionalrouting protocols such as standard BGP. FIG. 8 also illustrates theoptimized route 855 that goes from the data center 210A to the datacenter 210B to the data center 210C to the data center 210N to theorigin server 140. Not all of the data centers 210A-N are necessarilypart of the optimized route. For instance, the data centers 210D-E arenot part of the optimized route. In an embodiment, the packets areencapsulated (e.g., using UDP) for transit between the data centers onthe optimized route and include information that aids in routing. Asillustrated in FIG. 8 , a tunnel 864 is established between the datacenters 210A and 210B (e.g., the UDP tunnel 864), a tunnel 866 isestablished between the data centers 210B and 210C (e.g., the UDP tunnel866), and a tunnel 868 is established between the data centers 210C and210N (e.g., the UDP tunnel 868). Since the data center 210N is the exitdata center, it transmits the IP packets over the GRE tunnel 870 to theorigin server 140.

In an embodiment, the encapsulating header includes the full path thepacket should traverse through the distributed cloud computing network150. The full path can be encoded as a list of hops where each hop is anidentifier of a data center 210 (e.g., not a full IP address). In thisembodiment, the entry data center 210 determines the full path (e.g.,looks up the path in optimized route storage based on the destinationaddress) and encodes the full path in the encapsulating header. Eachintermediate data center 210 can then use the path encoded in theencapsulating header to route the traffic instead of accessing theoptimized route storage to determine the next hop.

In an embodiment, the encapsulating header includes a hash or identifierof the full path that is stored in optimized route storage on each ofthe data centers 210A-N that is keyed by the hash or identifier. In suchan embodiment, the entry data center 210 determines the full path (e.g.,looks up the path in optimized route storage based on the destinationaddress) and encodes the hash or identifier in the encapsulating header.Each intermediate data center can then use the encoded hash oridentifier to determine the path.

In an embodiment, the encapsulating header includes a hash or otheridentifier that represents a specific routing policy (e.g., stored inoptimized route storage) that is used for the optimized route. Forinstance, a routing policy may be: fastest by latency, lowest jitter,lowest packet loss, cheapest by bandwidth, data sovereignty policies(e.g., don't route through a particular geographic region), etc. In suchan embodiment, the entry data center 210 determines the routing policyto apply (e.g., looks up the routing policy in the optimized routestorage based on the destination address and/or source address), andincludes the hash or other identifier in the metadata of theencapsulating header. This allows each data center of the optimizedroute to consistently apply the same routing policy(ies).

In an embodiment, the encapsulating header includes a hash or otheridentifier of the origin network (e.g., a hash or other identifier ofthe IP address of the origin server and/or origin router). For instance,in some embodiments, the packet is encrypted (including the source anddestination IP address). Each data center 210 could decrypt the packetto determine the destination IP address. However, sincedecrypting/encrypting can be expensive, the hash or other identifier canbe used to lookup the next hop without having to decrypt the encryptedpayload.

FIG. 9 is a flow diagram illustrating exemplary operations forconfiguring and processing IPsec traffic according to an embodiment. Atoperation 910, an IPsec tunnel establishment request is received forestablishing an IPsec tunnel from a customer router (e.g., the customerrouter 182) to an anycast IP address of the distributed cloud computingnetwork 150 (associated with the IPsec tunnel service 186). The anycastIP address is shared among the compute servers 215A-N of the distributedcloud computing network 150. This request is received at a computeserver that is closest to the customer router in terms of an anycastimplementation. In this example, the compute server 215A.1 receives therequest. In an embodiment, each compute server is able to perform ahandshake (e.g., a key-agreement protocol such as Internet Key Exchange)with the customer router 182. For instance, key-agreement protocolconfiguration (e.g., customer identifier, preshared key, etc.) may bepropagated to each compute server.

Next, at operation 915, that compute server (e.g., compute server215A.1) performs a handshake (e.g., a key-agreement protocol such asInternet Key Exchange (IKE)) with the customer router. For instance, theIPsec tunnel service 186 of that compute server 215A.1 performs thehandshake with the router 182 of the private network 180. Performing thehandshake includes generating security association(s) for encrypting anddecrypting IPsec traffic. In an embodiment, the IPsec tunnel service 186forwards the generated security association(s) to the unified routingcontrol 240 to store in the unified network routing store 245. Theunified network routing store 245 may also store data about the IPsectunnel (e.g., customer identifier, IP address of the IPSec interface ofthe distributed cloud computing network 150 performing the handshake)and data about the IPSec route (e.g., customer identifier, IP address ofthe IPSec interface on the customer's router, the network/CIDR that theIPSec interface advertises). That compute server 215A.1 may also installthe security associations into its kernel space.

Next, at operation 920, the generated security association(s) arepropagated to each of the other compute servers 215A-N of thedistributed cloud computing network 150. In an embodiment, the controlserver 230 propagates the generated security association(s). In anotherembodiment, the compute server that generated the securityassociation(s) propagates the generated security association(s) to theother compute servers. For instance, the compute server 215A.1 maypropagate the security association(s) to each compute server 215A-N.Alternatively, the compute server 215A.1 may propagate the securityassociation(s) to a control server within each data center 210A-N thatthen propagates the security association(s) to the compute serverswithin that data center. The security association(s) are installed tothe kernel space at each compute server.

At this point, although the customer established a single IPsec tunnelthat was originally terminated at a single compute server, IPsec trafficcan be received and sent from each compute server of the distributedcloud computing network.

FIG. 10 is a flow diagram that illustrates exemplary operations forprocessing a packet that is destined for a device connected to thedistributed cloud computing network with an IPsec tunnel, according toan embodiment.

At operation 1010, a packet that is destined to the customer router(e.g., the customer router 182) is received at a compute server that didnot perform the handshake, such as the compute server 215B.1. The packetmay be received at any of the traffic interfaces (e.g., the L2/L3 tunnelservice 122, the VPN server 136, the tunnel service 146, the networkinterconnect 157, the web server 162, and the IPSec tunnel service 186).The packet may be subject to one or more services 168 to determinewhether the destination IP address of the packet belongs to thecustomer's network (in this case it is being sent to an IP address ofthe customer router 182) and if so, how to reach it (e.g., through useof the routing service 170 and the unified network routing store aspreviously described). The packet may also be subject to the securityservice 172 to determine whether the packet is permitted to betransmitted. At operation 1015, the compute server 215B.1 determinesthat the destination of the packet is connected to an IPsec trafficinterface (e.g., the IPsec tunnel service 186). For instance, therouting service 170 may access the unified network routing store todetermine that the destination IP address is associated with the IPsectraffic interface.

Next, at operation 1020, the packet is forwarded to the IPsec trafficinterface (e.g., the IPsec tunnel service 186). The IPsec trafficinterface encrypts the packet using the propagated security associationdata at operation 1025. At operation 1030, the IPsec traffic interfacetransmits the encrypted packet to the customer router over the IPsectunnel. For instance, the IPsec tunnel service 186 transmits theencrypted packet over the IPsec tunnel 188 to the customer router 182.

FIG. 11 is a flow diagram that illustrates exemplary operations forprocessing a packet that is received from a device connected to thedistributed cloud computing network with an IPsec tunnel, according toan embodiment.

At operation 1110, a compute server receives an encrypted packet from acustomer router over an IPsec tunnel. For example, the compute server215C.1 receives an encrypted packet from the customer router 182 overthe IPsec tunnel 188 at the IPsec tunnel service 186 running on thecompute server 215C.1. In this example, the compute server 215C.1 didnot perform the handshake with the customer router 182 to generate thesecurity associations for encrypting and decrypting traffic. However,the compute server 215C.1 has access to the appropriate securityassociation to decrypt the traffic.

At operation 1115, the compute server uses the propagated securityassociation to decrypt the encrypted packet. For instance, the IPsectunnel service 186 decrypts the encrypted packet thereby revealing anunencrypted packet. Next, at operation 1120, the compute serverprocesses the unencrypted packet. Processing the unencrypted packet mayinclude performing operations that are similar to the operations415-450. For instance, the packet may be processed at the services 168including the security service 172 to determine whether the packet ispermitted to be transmitted to the destination. Further, the packet maybe forwarded to an egress traffic interface (e.g., as determined by therouting service 170) for transmission to the destination.

In an embodiment, the distributed cloud computing network 150 handlestraffic between two customers having different network namespaces. Eachcustomer can define policies that define traffic destined for the partsof their network that they wish to expose to the other customer anddefine security and access policies for the traffic. A cross-customertunnel (e.g., a GRE tunnel) is deployed on a compute server where oneend terminates inside a first customer namespace and the other endterminates inside a second customer namespace. The customers canconfigure routing policies to determine what traffic in their ownnamespace gets routed to the other customer's namespace, effectivelyinterconnecting the two networks through a virtual traffic exchange.Although a network namespace may be used, other network isolationprimitives may be used to attribute packets to specific customers.

For example, a first customer can configure egress routing for devicesin their network to send traffic destined to a particular IP address ofa second customer to arrive at a network namespace of the first customerof the distributed cloud computing network 150. Traffic that meets thisegress routing rule arrives at one of the compute servers of thedistributed cloud computing network 150 (e.g., a compute server in adata center that is closest to the client device in terms of routingprotocol configuration according to an anycast implementation). Afterthe traffic arrives, one or more egress policies are applied to thetraffic (e.g., defined by the first customer) such as specifying certainuser(s) that are allowed to access that particular IP address of thesecond customer. If the traffic is allowed to be transmitted to thedestination of the second customer, the traffic is routed through thecross-customer tunnel (e.g., a GRE tunnel) where it is delivered to thenetwork namespace of the second customer. After the traffic arrives atthe network namespace of the second customer, one or more ingresspolicies are applied to the traffic (e.g., defined by the secondcustomer) such as specifying certain user(s) that are allowed to accessthat particular IP address of the second customer. If the traffic ispermitted to be transmitted to the destination, the traffic is routed tothe destination. Return packets from the second customer's networkfollow a similar flow but in reverse.

The embodiment described herein allows for a customer to build a secureand private traffic cross-connect with another network regardless ofphysical distance or colocation, all while applying security and accesspolicies before traffic enters their own network.

FIG. 12 illustrates an example of processing traffic received from anend user client device associated with a first customer networknamespace and that is destined to a private resource or applicationassociated with a second customer network namespace according to anembodiment. A first customer network namespace is associated with afirst customer (e.g., customer A network namespace 1220A) and a secondcustomer network namespace is associated with a second customer (e.g.,customer B network namespace 1220B). A cross-customer tunnel 1250 (e.g.,a GRE tunnel) is configured on the compute server 1215 where a firstendpoint terminates inside the customer A network namespace 1220A andthe second endpoint terminates inside the customer B network namespace1220B.

In the example of FIG. 12 , a user in the first customer's network withIP address 192.168.0.1 wants to access a resource (e.g., a webapplication) in a second customer's network with IP address 10.0.0.1.The first customer configured egress routing rules in the firstcustomer's network such that devices in their network that send trafficwith a destination of IP address 10.0.0.1 arrive at a first customernetwork namespace associated with the first customer (e.g., customer Anetwork namespace 1220A).

The traffic can be received at one or a plurality of compute servers ofthe distributed cloud computing network that is closest to the user(e.g., compute server 1215). For instance, traffic arrives at the firsttraffic interface 1210A. The first traffic interface 1210A may be anytype of traffic interface for receiving/transmitting traffic fromprivate and/or public networks, including the L2/L3 tunnel service 122,the VPN server 136, and the IPsec tunnel service 186. In the example ofFIG. 12 , the ingress traffic is attributable to a customer of theunified network service, namely customer A. For example, the source ofthe ingress traffic may be from a customer network and/or from a deviceassociated with the customer such as a VPN client. In the example ofFIG. 12 , the ingress traffic is destined for a resource or web propertyof a different customer of the unified network service, namely customerB.

The traffic interface 1210A passes the traffic and identity informationassociated with the traffic to the security service 1272A and/or theperformance service 1274A. The security service 1272A and theperformance service 1274A are like the security service 172 and theperformance service 174. In some embodiments, the traffic is tagged withthe identity information. The performance service 1274A, which isoptional in some embodiments, performs one or more performance serviceson the traffic as previously described using the identity information.

The security service 1272A, which is optional in some embodiments,performs one or more security services. For example, the securityservice 1272A can apply one or more policies to the received traffic todetermine whether access is allowed to the target destination. Forexample, traffic received at the distributed cloud computing networkthat is addressed to the IP address 10.0.0.1 can be subject to anidentity policy. The policies may be created by the customer and applyto layer 3, layer 4, layer 7 (for example) and can be based on identity,device posture, location, and/or risk signals. For example, the firstcustomer may specify particular user(s) and/or group(s) of user(s) thatare allowed to access the destination resource at the IP address10.0.0.1. In such a case, the security service 1272A only allows trafficto reach the destination resource at the IP address 10.0.0.1 if thattraffic is received from that particular user(s) and/or group(s) ofuser(s).

If the security service 1272A determines that the traffic is not allowedto the destination, the traffic is typically dropped. If the traffic isallowed to the destination, the security service 1272A forwards thetraffic to the routing service 1270A. The identity information is alsoforwarded to the routing service in an embodiment. The routing service1270A determines an outgoing traffic interface for sending the trafficto the destination. The routing service 1270A accesses the routes forthe customer A in the unified network routing store 1212A and determinesthat the destination is associated with the customer B for which thecustomer B network namespace 1220B is accessible by the cross-customertunnel 1250 (e.g., a GRE tunnel). The routing service 1270A forwards thetraffic over the cross-customer tunnel service 1246A. The trafficmetadata (e.g., the customer identifier, the traffic interfaceidentifier, the set of one or more IP addresses, and thesource/destination of the origin traffic) is also forwarded to thecross-customer tunnel service 1246A. The cross-customer tunnel service1246A transmits the traffic over the cross-customer tunnel 1250 (e.g.,encapsulating the traffic) to the cross-customer tunnel service 1246B ofthe customer B network namespace 1220B.

The cross-customer tunnel service 1246B of the customer B networknamespace 1220B receives the traffic over the cross-customer tunnel1250. The cross-customer tunnel service 1246B may decapsulate thetunneled traffic. The cross-customer tunnel service 1246B passes thetraffic and identity information associated with the traffic to thesecurity service 1272B and/or the performance service 1274B. In someembodiments, the traffic is tagged with the identity information. Thesecurity service 1272B and the performance service 1274B are configuredfor the network of customer B. For example, customer B may have adifferent security and access policy from that of customer A. Theperformance service 1274B, which is optional in some embodiments,performs one or more performance services on the traffic as previouslydescribed using the identity information. The security service 1272B,which is optional in some embodiments, performs one or more securityservices. For example, the security service 1272B can apply one or morepolicies configured for customer B to the received traffic to determinewhether access is allowed to the target destination. For example,traffic received at the distributed cloud computing network that isaddressed to the IP address 10.0.0.1 can be subject to an identitypolicy. The policies may be created by the customer and apply to layer3, layer 4, layer 7 (for example) and can be based on identity, deviceposture, location, and/or risk signals.

Ingress routing rules configured by the second customer are applied tothe traffic. For example, the second customer may specify particularuser(s) and/or group(s) of user(s) that are allowed to access theresource at the IP address 10.0.0.1. If the traffic passes the secondcustomer's ingress traffic rules, the security service 1272B forwardsthe traffic to the routing service 1270B. The identity information isalso forwarded to the routing service in an embodiment. The routingservice 1270B determines an outgoing traffic interface for sending thetraffic to the destination. The routing service 1270B accesses theroutes for the customer B in the unified network routing store 1212B anddetermines that the destination is reachable over the traffic interface1210B. The traffic interface 1210B is one of multiple traffic interfacesfor different types of traffic and/or connections such as an L2/L3tunnel service, a VPN server, a tunnel service, a network interconnect157, a web server 162, and an IPsec tunnel service 186. A response fromthe resource of the second customer is directed back to the userassociated with the first customer following a similar path as describedabove, but in reverse.

FIG. 13 is a flow diagram that illustrates exemplary operations forprocessing traffic received from an end user client device associatedwith a first customer network and that is destined to a private resourceor application associated with a second customer network according to anembodiment. The operations of FIG. 13 are described with respect to theexemplary embodiments of FIG. 12 . However, the operations of FIG. 13can be performed by embodiments different from that of FIG. 12 , and theembodiments described in reference to FIG. 12 can perform operationsdifferent from that of FIG. 13 .

At operation 1310, a compute server 1215 receives traffic at a trafficinterface 1210A of a first network namespace of a first customer. Thetraffic interface 1210A may be, for example, an L2/L3 tunnel servicelike the L2/L3 tunnel service 122, a VPN server like the VPN server 136,or an IPsec tunnel service like the IPsec tunnel service 186. Thetraffic is received from the client device 1230. The destination of thetraffic is a resource (e.g., an application) of a second customer thathas a second network namespace at the compute server 1215. Across-customer tunnel 1250, such as a GRE tunnel, is established betweenthe network namespace of the first customer and the network namespace ofthe second customer.

Next, at operation 1315, the compute server 1215 determines identityinformation associated with the received traffic. The determinedidentity information includes at least an identifier of a customer towhich the traffic is attributable. The ingress traffic may be associatedwith identity of the organization, identity of the client device thattransmitted the traffic, and/or identity of the user responsible fortransmitting the traffic, as previously described.

The first customer may configure or set a set of egress policies thatdefine criteria for sending traffic from their network to a network of asecond customer (e.g., security and/or access policies). For example,the first customer may define an egress policy that specifies only a setof one or more users are allowed to access a resource of the secondcustomer.

At operation 1320, the compute server 1215 determines whether thetraffic is allowed to be transmitted to the resource of the secondcustomer. The compute server 1215 applies a set of one or more egresspolicies configured for the first customer that are applicable for thereceived traffic and/or the destination. As an example, an egress policymay define that only certain users are allowed to access thatdestination of the second customer. If the traffic is allowed to betransmitted to the destination, then operation 1330 is performed. If thetraffic is not allowed to be transmitted to the destination per the setof egress policies configured for the first customer (e.g., the user ofthe first customer is not authorized to access the resource of thesecond customer), then operation 1325 is performed where the computeserver 1215 drops the traffic.

At operation 1330, the compute server 1215 transmits the traffic anddetermined identity information to the second network namespace of thesecond customer via a tunnel connecting the first customer namespace andthe second customer namespace (e.g., via a GRE tunnel). The traffic anddetermined identity information may be encapsulated according to thetunneling technique.

At operation 1335, the traffic and determined identity information arereceived at the second customer namespace of the compute server 1215 viathe tunnel connecting the first customer namespace and the secondcustomer namespace. At the second customer namespace, the traffic anddetermined identity information may be decapsulated according to thetunneling technique.

The second customer may configure or set a set of ingress policies thatdefine criteria for sending traffic received from a network of adifferent customer (e.g., the first customer in this example) anddestined to the resource of the second customer (e.g., security and/oraccess policies). For example, the second customer may define an ingresspolicy that specifies only a set of one or more users are allowed toaccess the resource of the second customer. In this example, it ispossible that the second customer may define a different set of usersthan the first customer defined that are allowed to access the resourceof the second customer. In such a case, for traffic from a particularuser to be transmitted to the resource, that user would need to beincluded on the set of users defined by the first customer and the setof users defined by the second customer.

At operation 1340, the compute server 1215 determines whether thetraffic is allowed to be transmitted to the resource of the secondcustomer. The compute server 1215 applies a set of one or more ingresspolicies configured for the second customer that are applicable for thereceived traffic and/or the destination. As an example, an ingresspolicy may define that only certain users are allowed to access thatdestination of the second customer. If the traffic is allowed to betransmitted to the destination, then operation 1345 is performed. If thetraffic is not allowed to be transmitted to the destination per the setof egress policies configured for the first customer (e.g., the user ofthe first customer is not authorized to access the resource of thesecond customer), then operation 1325 is performed where the computeserver 1215 drops the traffic.

At operation 1345, the compute server 1215 determines the outgoingtraffic interface for the traffic to reach the target destination, whichmay be on a different compute server. For example, the routing service1270B accesses the unified network routing store 1212B to determine theoutgoing traffic interface for the traffic as previously described. Theoutgoing traffic interface may be a different kind of traffic interfacecompared to the incoming traffic interface. For instance, trafficarriving on a GRE tunnel interface may be sent to a layer 7 based tunnelinterface to connect to the target destination. As another example,traffic arriving via an agent on an end user client device can be sentto an IPSec tunnel interface.

Next, at operation 1350, the traffic is transmitted to the determinedtraffic interface for egress traffic to the target destination. Next, atoperation 1355, the traffic is transmitted from the determined trafficinterface for the egress traffic to the target destination.

It is possible that multiple customers can use overlapping private IPaddress space. For instance, it is possible that a first customer canhave the IP address 10.0.0.1 assigned to one of its applications and asecond customer can have the IP address 10.0.0.1 assigned to one of itsapplications. In such a case, if the first customer wanted to access thesecond customer's application that runs on 10.0.0.1, then a networkaddress translation (NAT) is performed in one of the customer'snamespace. For instance, the first customer may use an IP address thatit does not use (e.g., 10.10.10.1) and the second customer may perform aNAT to change packets destined for that not-in-use IP address (e.g.,10.10.10.1) to the IP address of the target application (e.g., 10.0.0.1)for packets in the second customer's namespace. Thus, the first customerconnects to the not-in-use IP address (e.g., 10.10.10.1) and packets mayenter the second customer's network namespace (assuming policy allows)where they are translated to 10.0.0.1 for accessing the targetapplication.

FIG. 14 illustrates a block diagram for an exemplary data processingsystem 1400 that may be used in some embodiments. One or more such dataprocessing systems 1400 may be used to implement the embodiments andoperations described with respect to the compute servers or othercomputing devices. The data processing system 1400 is a computing devicethat stores and transmits (internally and/or with other computingdevices over a network) code (which is composed of software instructionsand which is sometimes referred to as computer program code or acomputer program) and/or data using machine-readable media (also calledcomputer-readable media), such as machine-readable storage media 1410(e.g., magnetic disks, optical disks, read only memory (ROM), flashmemory devices, phase change memory) and machine-readable transmissionmedia (also called a carrier) (e.g., electrical, optical, radio,acoustical or other form of propagated signals—such as carrier waves,infrared signals), which is coupled to the processing system 1420 (e.g.,one or more processors and connected system components such as multipleconnected chips). For example, the depicted machine-readable storagemedia 1410 may store program code 1430 that, when executed by theprocessor(s) 1420, causes the data processing system 1400 to perform anyof the operations described herein.

The data processing system 1400 also includes one or more networkinterfaces 1440 (e.g., a wired and/or wireless interfaces) that allowsthe data processing system 1400 to transmit data and receive data fromother computing devices, typically across one or more networks (e.g.,Local Area Networks (LANs), the Internet, etc.). The data processingsystem 1400 may also include one or more input or output (“I/O”)components 1450 such as a mouse, keypad, keyboard, a touch panel or amulti-touch input panel, camera, frame grabber, optical scanner, anaudio input/output subsystem (which may include a microphone and/or aspeaker), other known I/O devices or a combination of such I/O devices.Additional components, not shown, may also be part of the system 1400,and, in certain embodiments, fewer components than that shown in One ormore buses may be used to interconnect the various components shown inFIG. 14 .

The techniques shown in the figures can be implemented using code anddata stored and executed on one or more computing devices (e.g., acompute server, a client device, a router, an origin server). Suchcomputing devices store and communicate (internally and/or with othercomputing devices over a network) code and data using computer-readablemedia, such as non-transitory computer-readable storage media (e.g.,magnetic disks; optical disks; random access memory; read only memory;flash memory devices; phase-change memory) and transitorycomputer-readable communication media (e.g., electrical, optical,acoustical or other form of propagated signals—such as carrier waves,infrared signals, digital signals). In addition, such computing devicestypically include a set of one or more processors coupled to one or moreother components, such as one or more storage devices (non-transitorymachine-readable storage media), user input/output devices (e.g., akeyboard, a touchscreen, and/or a display), and network connections. Thecoupling of the set of processors and other components is typicallythrough one or more busses and bridges (also termed as bus controllers).Thus, the storage device of a given computing device typically storescode and/or data for execution on the set of one or more processors ofthat computing device. Of course, one or more parts of an embodiment ofthe invention may be implemented using different combinations ofsoftware, firmware, and/or hardware.

In the preceding description, numerous specific details are set forth toprovide a more thorough understanding of the present invention. It willbe appreciated, however, by one skilled in the art that the inventionmay be practiced without such specific details. In other instances,control structures, gate level circuits and full software instructionsequences have not been shown in detail in order not to obscure theinvention. Those of ordinary skill in the art, with the includeddescriptions, will be able to implement appropriate functionalitywithout undue experimentation.

References in the specification to “one embodiment,” “an embodiment,”“an example embodiment,” etc., indicate that the embodiment describedmay include a particular feature, structure, or characteristic, butevery embodiment may not necessarily include the particular feature,structure, or characteristic. Moreover, such phrases are not necessarilyreferring to the same embodiment. Further, when a particular feature,structure, or characteristic is described in connection with anembodiment, it is submitted that it is within the knowledge of oneskilled in the art to affect such feature, structure, or characteristicin connection with other embodiments whether or not explicitlydescribed.

Bracketed text and blocks with dashed borders (e.g., large dashes, smalldashes, dot-dash, and dots) may be used herein to illustrate optionaloperations that add additional features to embodiments of the invention.However, such notation should not be taken to mean that these are theonly options or optional operations, and/or that blocks with solidborders are not optional in certain embodiments of the invention.

While the flow diagrams in the figures show a particular order ofoperations performed by certain embodiments of the invention, it shouldbe understood that such order is exemplary (e.g., alternativeembodiments may perform the operations in a different order, combinecertain operations, overlap certain operations, etc.).

While the invention has been described in terms of several embodiments,those skilled in the art will recognize that the invention is notlimited to the embodiments described, can be practiced with modificationand alteration within the spirit and scope of the appended claims. Thedescription is thus to be regarded as illustrative instead of limiting.

What is claimed is:
 1. A method, comprising: receiving first traffic ata first traffic interface at a first compute server of a distributedcloud computing network, wherein the received first traffic is destinedfor a private application or service running on a server of a customerof a unified network service provided through the distributed cloudcomputing network, wherein the server is outside of the distributedcloud computing network, wherein the first traffic interface is an IPsectunnel interface that interfaces with an IPsec tunnel from a router ofthe customer, wherein the IPsec tunnel interface is assigned an IPaddress that is an anycast IP address that is shared among the firstcompute server and a plurality of other compute servers of thedistributed cloud computing network, and wherein a different one of theother compute servers of the distributed cloud computing networkperformed a handshake with the router including generating a set of oneor more security associations for encrypting and decrypting; receivingthe generated set of one or more security associations for encryptingand decrypting traffic on the IPsec tunnel interface, wherein thereceived first traffic is encrypted; decrypting the encrypted receivedfirst traffic using the set of one or more security associations;determining identity information associated with the received firsttraffic including that the received first traffic is attributable to thecustomer including identifying the customer based on the IPsec tunnelbeing associated with an account of the customer; determining, using oneor more policies configured for the customer and the determined identityinformation associated with the received first traffic, whether thereceived first traffic is allowed to be transmitted to the privateapplication or service including determining whether traffic receivedover the IPsec tunnel is allowed to access the private application orservice; responsive to determining that the received first traffic isallowed to be transmitted to the private application or service,determining a second traffic interface that interfaces with the serverof the customer, wherein the second traffic interface is a layer 7traffic interface, and wherein the determined second traffic interfaceis on a second compute server of the distributed cloud computingnetwork; transmitting the received first traffic from the first computeserver to the determined second traffic interface on the second computeserver; and transmitting, from the determined second traffic interfaceon the second compute server to the server of the customer, the receivedfirst traffic.
 2. The method of claim 1, further comprising: receivingsecond traffic at a third traffic interface at a first compute server ofa distributed cloud computing network, wherein the third trafficinterface is a generic routing encapsulation (GRE) interface thatinterfaces with a GRE tunnel from the router of the customer, andwherein the received second traffic is destined for the privateapplication or service running on the server of the customer;determining identity information associated with the received secondtraffic including that the received second traffic is attributable tothe customer based based on the GRE tunnel being associated with anaccount of the customer; determining, using one or more policiesconfigured for the customer and the determined identity informationassociated with the received second traffic, whether the received secondtraffic is allowed to be transmitted to the private application orservice including determining whether traffic received over the GREtunnel is allowed to access the private application or service;responsive to determining that the received second traffic is allowed tobe transmitted to the private application or service, determining thesecond traffic interface that interfaces with the server of thecustomer; and transmitting the received second traffic from the firstcompute server to the determined second traffic interface on the secondcompute server for transmitting the received second traffic to theprivate application or service.
 3. The method of claim 2, whereindetermining the identity information associated with the received secondtraffic further includes identifying a user of the customer transmittingthe second traffic over the GRE tunnel, and wherein determining whetherthe received second traffic at the GRE interface is allowed to betransmitted to the private application or service further includesdetermining whether the identified user is allowed to access the privateapplication or service.
 4. The method of claim 1, further comprising:receiving second traffic at a third traffic interface at a first computeserver of a distributed cloud computing network, wherein the thirdtraffic interface is a virtual private network (VPN) interface thatinterfaces with a VPN tunnel connected to a VPN client, and wherein thereceived second traffic is destined for the private application orservice running on the server of the customer; determining identityinformation associated with the received second traffic includingdetermining a user of the VPN client; determining, using one or morepolicies configured for the customer and the determined identityinformation associated with the received second traffic, whether thereceived second traffic is allowed to be transmitted to the privateapplication or service including determining whether the determined useris allowed to access the private application or service; responsive todetermining that the received second traffic is allowed to betransmitted to the private application or service, determining thesecond traffic interface that interfaces with the server of thecustomer; and transmitting the received second traffic from the firstcompute server to the determined second traffic interface on the secondcompute server for transmitting the received second traffic to theprivate application or service.
 5. The method of claim 1, whereintransmitting the received first traffic from the first compute server tothe determined second traffic interface on the second compute server isproxied over an HTTP/2 proxy.
 6. The method of claim 1, furthercomprising: marking the received first traffic with the determinedidentity information.
 7. A non-transitory machine-readable storagemedium that provides instructions that, if executed by a processor, willcause said processor to carry out operations comprising: receiving firsttraffic at a first traffic interface at a first compute server of adistributed cloud computing network, wherein the received first trafficis destined for a private application or service running on a server ofa customer of a unified network service provided through the distributedcloud computing network, wherein the server is outside of thedistributed cloud computing network, wherein the first traffic interfaceis an IPsec tunnel interface that interfaces with an IPsec tunnel from arouter of the customer, wherein the IPsec tunnel interface is assignedan IP address that is an anycast IP address that is shared among thefirst compute server and a plurality of other compute servers of thedistributed cloud computing network, and wherein a different one of theother compute servers of the distributed cloud computing networkperformed a handshake with the router including generating a set of oneor more security associations for encrypting and decrypting; receivingthe generated set of one or more security associations for encryptingand decrypting traffic on the IPsec tunnel interface, wherein thereceived first traffic is encrypted; decrypting the encrypted receivedfirst traffic using the set of one or more security associations;determining identity information associated with the received firsttraffic including that the received first traffic is attributable to thecustomer including identifying the customer based on the IPsec tunnelbeing associated with an account of the customer; determining, using oneor more policies configured for the customer and the determined identityinformation associated with the received first traffic, whether thereceived first traffic is allowed to be transmitted to the privateapplication or service including determining whether traffic receivedover the IPsec tunnel is allowed to access the private application orservice; responsive to determining that the received first traffic isallowed to be transmitted to the private application or service,determining a second traffic interface that interfaces with the serverof the customer, wherein the second traffic interface is a layer 7traffic interface, and wherein the determined second traffic interfaceis on a second compute server of the distributed cloud computingnetwork; transmitting the received first traffic from the first computeserver to the determined second traffic interface on the second computeserver; and transmitting, from the determined second traffic interfaceon the second compute server to the server of the customer, the receivedfirst traffic.
 8. The non-transitory machine-readable storage medium ofclaim 7, wherein the operations further comprise: receiving secondtraffic at a third traffic interface at a first compute server of adistributed cloud computing network, wherein the third traffic interfaceis a generic routing encapsulation (GRE) interface that interfaces witha GRE tunnel from the router of the customer, and wherein the receivedsecond traffic is destined for the private application or servicerunning on the server of the customer; determining identity informationassociated with the received second traffic including that the receivedsecond traffic is attributable to the customer based based on the GREtunnel being associated with an account of the customer; determining,using one or more policies configured for the customer and thedetermined identity information associated with the received secondtraffic, whether the received second traffic is allowed to betransmitted to the private application or service including determiningwhether traffic received over the GRE tunnel is allowed to access theprivate application or service; responsive to determining that thereceived second traffic is allowed to be transmitted to the privateapplication or service, determining the second traffic interface thatinterfaces with the server of the customer; and transmitting thereceived second traffic from the first compute server to the determinedsecond traffic interface on the second compute server for transmittingthe received second traffic to the private application or service. 9.The non-transitory machine-readable storage medium of claim 8, whereindetermining the identity information associated with the received secondtraffic further includes identifying a user of the customer transmittingthe second traffic over the GRE tunnel, and wherein determining whetherthe received second traffic at the GRE interface is allowed to betransmitted to the private application or service further includesdetermining whether the identified user is allowed to access the privateapplication or service.
 10. The non-transitory machine-readable storagemedium of claim 7, wherein the operations further comprise: receivingsecond traffic at a third traffic interface at a first compute server ofa distributed cloud computing network, wherein the third trafficinterface is a virtual private network (VPN) interface that interfaceswith a VPN tunnel connected to a VPN client, and wherein the receivedsecond traffic is destined for the private application or servicerunning on the server of the customer; determining identity informationassociated with the received second traffic including determining a userof the VPN client; determining, using one or more policies configuredfor the customer and the determined identity information associated withthe received second traffic, whether the received second traffic isallowed to be transmitted to the private application or serviceincluding determining whether the determined user is allowed to accessthe private application or service; responsive to determining that thereceived second traffic is allowed to be transmitted to the privateapplication or service, determining the second traffic interface thatinterfaces with the server of the customer; and transmitting thereceived second traffic from the first compute server to the determinedsecond traffic interface on the second compute server for transmittingthe received second traffic to the private application or service. 11.The non-transitory machine-readable storage medium of claim 7, whereintransmitting the received first traffic from the first compute server tothe determined second traffic interface on the second compute server isproxied over an HTTP/2 proxy.
 12. The non-transitory machine-readablestorage medium of claim 7, wherein the operations further comprise:marking the received first traffic with the determined identityinformation.
 13. A server, comprising: a processor; and a non-transitorymachine-readable storage medium that provides instructions that, ifexecuted by the processor, will cause the server to carry out operationscomprising: receiving first traffic at a first traffic interface at afirst compute server of a distributed cloud computing network, whereinthe received first traffic is destined for a private application orservice running on a server of a customer of a unified network serviceprovided through the distributed cloud computing network, wherein theserver is outside of the distributed cloud computing network, whereinthe first traffic interface is an IPsec tunnel interface that interfaceswith an IPsec tunnel from a router of the customer, wherein the IPsectunnel interface is assigned an IP address that is an anycast IP addressthat is shared among the first compute server and a plurality of othercompute servers of the distributed cloud computing network, and whereina different one of the other compute servers of the distributed cloudcomputing network performed a handshake with the router includinggenerating a set of one or more security associations for encrypting anddecrypting; receiving the generated set of one or more securityassociations for encrypting and decrypting traffic on the IPsec tunnelinterface, wherein the received first traffic is encrypted; decryptingthe encrypted received first traffic using the set of one or moresecurity associations; determining identity information associated withthe received first traffic including that the received first traffic isattributable to the customer including identifying the customer based onthe IPsec tunnel being associated with an account of the customer;determining, using one or more policies configured for the customer andthe determined identity information associated with the received firsttraffic, whether the received first traffic is allowed to be transmittedto the private application or service including determining whethertraffic received over the IPsec tunnel is allowed to access the privateapplication or service; responsive to determining that the receivedfirst traffic is allowed to be transmitted to the private application orservice, determining a second traffic interface that interfaces with theserver of the customer, wherein the second traffic interface is a layer7 traffic interface, and wherein the determined second traffic interfaceis on a second compute server of the distributed cloud computingnetwork; transmitting the received first traffic from the first computeserver to the determined second traffic interface on the second computeserver; and transmitting, from the determined second traffic interfaceon the second compute server to the server of the customer, the receivedfirst traffic.
 14. The server of claim 13, wherein the operationsfurther comprise: receiving second traffic at a third traffic interfaceat a first compute server of a distributed cloud computing network,wherein the third traffic interface is a generic routing encapsulation(GRE) interface that interfaces with a GRE tunnel from the router of thecustomer, and wherein the received second traffic is destined for theprivate application or service running on the server of the customer;determining identity information associated with the received secondtraffic including that the received second traffic is attributable tothe customer based based on the GRE tunnel being associated with anaccount of the customer; determining, using one or more policiesconfigured for the customer and the determined identity informationassociated with the received second traffic, whether the received secondtraffic is allowed to be transmitted to the private application orservice including determining whether traffic received over the GREtunnel is allowed to access the private application or service;responsive to determining that the received second traffic is allowed tobe transmitted to the private application or service, determining thesecond traffic interface that interfaces with the server of thecustomer; and transmitting the received second traffic from the firstcompute server to the determined second traffic interface on the secondcompute server for transmitting the received second traffic to theprivate application or service.
 15. The server of claim 14, whereindetermining the identity information associated with the received secondtraffic further includes identifying a user of the customer transmittingthe second traffic over the GRE tunnel, and wherein determining whetherthe received second traffic at the GRE interface is allowed to betransmitted to the private application or service further includesdetermining whether the identified user is allowed to access the privateapplication or service.
 16. The server of claim 13, wherein theoperations further comprise: receiving second traffic at a third trafficinterface at a first compute server of a distributed cloud computingnetwork, wherein the first third traffic interface is a virtual privatenetwork (VPN) interface that interfaces with a VPN tunnel connected to aVPN client, and wherein the received second traffic is destined for theprivate application or service running on the server of the customer;determining identity information associated with the received secondtraffic including determining a user of the VPN client; determining,using one or more policies configured for the customer and thedetermined identity information associated with the received secondtraffic, whether the received second traffic is allowed to betransmitted to the private application or service including determiningwhether the determined user is allowed to access the private applicationor service; responsive to determining that the received second trafficis allowed to be transmitted to the private application or service,determining the second traffic interface that interfaces with the serverof the customer; and transmitting the received second traffic from thefirst compute server to the determined second traffic interface on thesecond compute server for transmitting the received second traffic tothe private application or service.
 17. The server of claim 13, whereintransmitting the received first traffic from the first compute server tothe determined second traffic interface on the second compute server isproxied over an HTTP/2 proxy.
 18. The server of claim 13, wherein theoperations further comprise: marking the received first traffic with thedetermined identity information.